/// <summary> /// Creates an instance of the SaveGame Class. /// </summary> /// <param name="sender">This is the object that called this constructor.</param> /// <param name="actionAfterSave">This is the action that this class should do when it is done.</param> /// <param name="NumberOfColumns">This is number of columns that the GameMap that called it has.</param> /// <param name="NumberOfRows">This is number of rows that the GameMap that called it has.</param> /// <param name="StateOfMineSpace">This is a two diminsional array that represents the state of each mine space that the GameMap that called it has.</param> /// <param name="ContainsMine">This is a two diminsional array that represents whether each mine space has a mine for the GameMap object that called it has.</param> public SaveGame(GameMap sender, GameFilesDialog.ActionsAfterDialog actionAfterSave, int NumberOfColumns, int NumberOfRows, GameMap.MineSpaceStates[,] StateOfMineSpace, bool[,] ContainsMine) { numberOfColumns = NumberOfColumns; numberOfRows = NumberOfRows; stateOfMineSpace = StateOfMineSpace; containsMine = ContainsMine; GameMapSender = sender; saveDialog = new GameFilesDialog(actionAfterSave, sender, this, "save game", "Save"); }
/// <summary> /// Presents the user with a window that allows them to load a game. /// </summary> /// <param name="sender"> /// The game map that called the function /// </param> public LoadGame(GameMap sender) { GameMapSender = sender; loadDialog = new GameFilesDialog(GameFilesDialog.ActionsAfterDialog.Nothing, sender, this, "load game", "Load"); }
/// <summary> /// This constructor creates an instance of the DeleteSave Class. /// </summary> /// <param name="sender">This is the object that created this instance</param> /// <param name="actionAfterSave">This represents the action that we should take after we are done deleting games.</param> public DeleteSave(GameMap sender, GameFilesDialog.ActionsAfterDialog actionAfterSave) { GameMapSender = sender; saveDialog = new GameFilesDialog(actionAfterSave, sender, this, "delete more save games", "Delete"); }