A rudimentary snake game side project I try to set aside ~25 minutes (1 pomodoro) a day to work on.
Control the snake to eat as much candy as you can to beat your high score!
Try not to collide with yourself or the walls, or you'll get a game over!
Use the UP
, DOWN
, LEFT
, and RIGHT
arrows to control the snake.
To restart after a game over, click the game or press SPACEBAR
.
Clone this repo and run a local web server to host the index.html.
cd <DIRECTORY_YOU_WANT>
git clone https://github.com/Sensational-Code/snake-game.git
cd snake-game
python -m SimpleHTTPServer <PORT_NUMBER>
Replace <DIRECTORY_YOU_WANT> with your desired directory and <PORT_NUMBER> with your desired port number.
Then visit localhost:<PORT_NUMBER> in your web browser of choice.