public void Resume() { if ((MsGame = GameToFile.Load()) != null) { GameToFile.RemoveFile(); MX_Height = MsGame.UpperMatrix.Count; MX_Width = MsGame.UpperMatrix[0].Count; NUM_BOMBS = MsGame.LowerMatrix.getNumBombs(); FillWithBoxes(); InitWindow(); } }
public MainWindow() { InitializeComponent(); GameIcons = new IconCollection(); if (GameToFile.isFileExist()) { Resume(); } else { StartNewGame(); } }
private void saveGameButton_Click(object sender, RoutedEventArgs e) { GameToFile.Save(this.MsGame); }