private static void GameOver() { foreach (var point in MathHelper.GetSpiralArray(4, 4)) { Thread.Sleep(100); Matrix._cells[point.X, point.Y] = 0; OutPutHelper.RefreshScreen(); } }
private static void Main(string[] args) { Console.Title = "2048"; Console.BufferWidth = Console.WindowWidth = GameConfig.WindowsWidth; Console.BufferHeight = Console.WindowHeight = GameConfig.WindowHeight; Console.CursorVisible = false; _gameManager.ReStart(); while (true) { OutPutHelper.RefreshScreen(); var key = Console.ReadKey().Key; if (_consoleKeyDic.Keys.Contains(key)) { Move(_consoleKeyDic[key]); } else if (key == ConsoleKey.F5) { _gameManager.ReStart(); } } }