Prevents the snake from disappearing when its eating an apple.
This commit is contained in:
parent
c459247529
commit
3902d2b0a9
2
game.go
2
game.go
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user