feat: fully functional CLI and Avalonia UI for Snake game
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user