Tap, click, or press a key on the canvas to start browser audio.
# Snake

A small Snake example for The Flywheel Engine. It has manual play, a title and pause menu, and a simple reward-based auto-play mode that scores the next forward, left, and right moves.

## Controls

- Arrow keys or Physical W / A / S / D: steer the snake.
- Arrow Up / Arrow Down or Physical W / S: move menu selection.
- Enter or Space: activate the selected menu item.
- Escape: pause while playing.
- Mouse click or touch a menu item: activate it.
- Mouse click or touch the game board: pause while playing.
- Gamepad d-pad: steer the snake and move menu selection.
- Gamepad South: activate the selected menu item.
- Gamepad Start or Back: pause while playing.
- Quit from a menu exits the app.

## TODO

### Make sure there is a way out

When using A* and an apple spawn in an area encased by the snake, the snake
will happily go for the apple, even if it means there is no way out after.

We should make sure it never goes for the apple, if it means it can not get out after.  
Maybe we could simply test if there is a way from the apple to the end of the snake, and do some idle looping around the edge until there is?