This is my basic implementation of a command line based snake game. The snake head is represented by the @ character while the rest of the body is represented by # character. Food is represented by o character.
To run, clone the project using:
git clone https://github.com/utukj/skycoin_snake.git
In the cloned project folder, run the game using:
./snake
for Mac or Linux or snake
for Windows
You can pass specify board size by passing command line arguments for height and width. E.g. to specify 30 by 40: snake 30 40
After running, controls to play are on the right side of the board.
W - up | S - down | A - left | D - right and hit enter (case insensitive) If you hit enter without choosing or choosing other character, snake continues on current direction Running into a wall or into snake body results in Game Over :)
This task took me 3 days, working 3 hrs a day to complete.