Prevents the snake from disappearing when its eating an apple.

This commit is contained in:
Sacha Ligthert 2023-11-23 19:17:40 +01:00
parent c459247529
commit 3902d2b0a9

View File

@ -97,8 +97,8 @@ func gameDirector(screen tcell.Screen, style tcell.Style, keypresses chan int, g
// Draw the screen
drawBox(screen, 0, 0, screenx-1, screeny-1, style)
drawCoords(screen, style, &snakex, &snakey)
drawSnake(screen, style, snakex, snakey)
drawApple(screen, style, apple.x, apple.y)
drawSnake(screen, style, snakex, snakey)
drawScore(screen, style, score)
// Draw the screen