More comments
This commit is contained in:
parent
c2134de4b7
commit
e66f2a2672
1
game.go
1
game.go
@ -69,6 +69,7 @@ func gameDirector(screen tcell.Screen, style tcell.Style, keypresses chan int, g
|
||||
snakeDirection(lastpress, &snakex, &snakey)
|
||||
}
|
||||
|
||||
// Call it quits once the snake hits the border.
|
||||
if snakex == 0 || snakex == screenx-1 {
|
||||
close(gamestate)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user