private void ControlConditions() { bool buttonSelected = false; ConsoleKeyInfo consoleKey = new ConsoleKeyInfo(); while (!Console.KeyAvailable && buttonSelected == false) { consoleKey = Console.ReadKey(true); switch (consoleKey.Key) { case ConsoleKey.LeftArrow: buttonPosition -= 1; break; case ConsoleKey.RightArrow: buttonPosition += 1; break; } if (buttonPosition < 0) { buttonPosition = 2; } if (buttonPosition > 2) { buttonPosition = 0; } switch (buttonPosition) { case 0: startButton.SetButtonActive(); quitButton.SetButtonInactive(); highScoreButton.SetButtonInactive(); quitButton.Render(); highScoreButton.Render(); startButton.Render(); break; case 1: highScoreButton.SetButtonActive(); startButton.SetButtonInactive(); quitButton.SetButtonInactive(); quitButton.Render(); highScoreButton.Render(); startButton.Render(); break; case 2: quitButton.SetButtonActive(); startButton.SetButtonInactive(); highScoreButton.SetButtonInactive(); quitButton.Render(); highScoreButton.Render(); startButton.Render(); break; default: System.Windows.Forms.MessageBox.Show("Unexpected Error!"); break; } if (buttonPosition == 2 && consoleKey.Key == ConsoleKey.Enter) { buttonSelected = true; Environment.Exit(0); } if (buttonPosition == 0 && consoleKey.Key == ConsoleKey.Enter) { buttonSelected = true; startGame.Render(); } if (buttonPosition == 1 && consoleKey.Key == ConsoleKey.Enter) { throw new NotImplementedException(); //TODO: Gets the highscores! } } }