Beispiel #1
0
func Rewind(board *snake.Board) Handler {
	return ModifyAndWrite(board, func() {
		board.Rewind()
	})
}
Beispiel #2
0
func MoveForward(board *snake.Board) Handler {
	return ModifyAndWrite(board, func() {
		board.Move(snake.Forward)
	})
}
Beispiel #3
0
func Reset(board *snake.Board) Handler {
	return ModifyAndWrite(board, func() {
		board.Initialize()
	})
}
Beispiel #4
0
func MoveRight(board *snake.Board) Handler {
	return ModifyAndWrite(board, func() {
		board.Move(snake.Right)
	})
}