private void Input_KeyDown(object sender, KeyEventArgs e) { // Game is finished if (game.CurrentLevel > Game.MAX_LEVEL) { return; } // Level is finished if (game.CheckSuccess()) { if (e.KeyCode == Keys.Enter && game.CurrentLevel < Game.MAX_LEVEL) { game.LoadNextLevel(); InitLevel(); } return; } game.Event(e.KeyCode); UpdateUI(); }