static void TestInitt() { Console.SetCursorPosition(0, 26); Console.WriteLine("Game Over!"); MaxScore mxscore = new MaxScore(); mxscore.TestMaxScore(); Console.ReadLine(); }
static void ReadKeys() { ConsoleKeyInfo s; if (Console.KeyAvailable) { s = Console.ReadKey(true); switch (s.Key) { case ConsoleKey.UpArrow: if (current != direction.DOWN) { current = direction.UP; } break; case ConsoleKey.DownArrow: if (current != direction.UP) { current = direction.DOWN; } break; case ConsoleKey.LeftArrow: if (current != direction.RIGHT) { current = direction.LEFT; } break; case ConsoleKey.RightArrow: if (current != direction.LEFT) { current = direction.RIGHT; } break; case ConsoleKey.P: { MaxScore mxscore = new MaxScore(); mxscore.TestMaxScore(); Environment.Exit(0); } break; default: break; } } }