This is a fun interview challenge for Typescript.
To start a new game run:
yarn start {height} {width}
yarn test
The grid is specified in (x, y) coordinates i.e.
----------> x
|
|
|
|
y
- Move snake
- Snake changes direction
- Snake eats apples
- Game over if snake eats itself