Explorar o código

More comments

Sacha Ligthert %!s(int64=2) %!d(string=hai) anos
pai
achega
e66f2a2672
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      game.go

+ 1 - 0
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