public void CheckGameState() { if (game.GameState == GameStates.Win) { game.level++; timer.Stop(); this.Hide(); var winWindow = new Level2Passed(); winWindow.ShowDialog(); this.Close(); } if (game.GameState == GameStates.Lose) { timer.Stop(); this.Hide(); var winWindow = new LoseForm(game); winWindow.ShowDialog(); this.Close(); } }
public void CheckGameState() { if (game.GameState == GameStates.Win) { game.level = 1; ChangeLevel(game); timer.Stop(); this.Hide(); var winWindow = new WinnerForm(); winWindow.ShowDialog(); this.Close(); } if (game.GameState == GameStates.Lose) { ChangeLevel(game); timer.Stop(); this.Hide(); var winWindow = new LoseForm(game); winWindow.ShowDialog(); this.Close(); } }