secret ate a bug

This commit is contained in:
Kim 2023-07-13 16:51:39 +02:00
parent 9777771c7f
commit 142044c77b
1 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ public static class SnakeGameSs
{
public static async Task PlaySnake()
{
var tickRate = TimeSpan.FromMilliseconds(100);
var tickRate = TimeSpan.FromMilliseconds(90);
var snakeGame = new SnakeGame();
using (var cts = new CancellationTokenSource())
@ -86,7 +86,7 @@ public static class SnakeGameSs
public void Render()
{
Console.SetCursorPosition(Position.Left, Position.Top);
Console.Write("🍏");
Console.Write("🐜");
}
}
@ -272,8 +272,8 @@ public static class SnakeGameSs
const int numberOfColumns = 20;
var random = new Random();
var top = random.Next(0, numberOfRows + 1);
var left = random.Next(0, numberOfColumns + 1);
var top = random.Next(1, numberOfRows);
var left = random.Next(1, numberOfColumns);
var position = new Position(top, left);
var apple = new Apple(position);