- On a Mac...
git clone ...
brew install node@10
yarn
, wait while it downloads...yarn start
- Visit http://localhost:3000 in a browser
- I pair-programmed this in 90 mins with my 7 year old.
- Score is the number of segments in your snake minus the 4 you started with.
- Eating fruit grows your snake by 2 segments (because the arena is huge).
- Hitting the boundary makes you move along it in a consistent and predictable (clockwise!) direction.
- If you eat fruit and your tail grows into the boundary, it moves back along the boundary, same as your head does.
- Keys are arrow keys. You can't turn back on yourself, obviously.
- You can pause / unpause the game with a button on screen.
There may be bugs...