瀏覽代碼

More comments

Sacha Ligthert 2 年之前
父節點
當前提交
e66f2a2672
共有 1 個文件被更改,包括 1 次插入0 次删除
  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