public void ShowMenu() { BuildMenu(); while (true) { switch (selection) { case 0: DrawLine(45, 18, 8); break; case 1: DrawLine(45, 20, 8); break; case 2: DrawLine(45, 22, 8); break; default: break; } if (Console.KeyAvailable == true) { ConsoleKeyInfo key = Console.ReadKey(); if (key.Key == ConsoleKey.DownArrow) { selectLine.ClearFigure(); Selection++; } else if (key.Key == ConsoleKey.UpArrow) { selectLine.ClearFigure(); Selection--; } if (key.Key == ConsoleKey.Enter) { if (selection == 0) { Console.Clear(); game.Start(); BuildMenu(); } else if (selection == 1) { new Nothing(); BuildMenu(); } else if (selection == 2) { break; } } } } }
static void Main(string[] args) { Game currentGame = new Game(); currentGame.Start(); }