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