feat: fully functional CLI and Avalonia UI for Snake game

This commit is contained in:
Heller
2026-06-17 19:03:22 +00:00
parent 42fcaf8631
commit 0d9710965c
6 changed files with 207 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ using Snake.Core;
const int boardWidth = 20;
const int boardHeight = 15;
const int tickMs = 120;
const int baseTickMs = 120;
SnakeGame game = new(boardWidth, boardHeight);
ConsoleRenderer.Render(game);
@@ -40,5 +40,5 @@ while (true)
game.Tick();
ConsoleRenderer.Render(game);
Thread.Sleep(tickMs);
Thread.Sleep(SnakeGame.GetTickIntervalMs(game.Score, baseTickMs));
}