Ugly but usable snake game. Try it out here!.
Just do npm i
to install dependencies, and launch npm start
. This will start a server on localhost:8080
.
npm build
will create a folder dist
with the output.
Use the arrows or WASD to move the snake. The goal is to eat the apple (red square) in the board without hitting the walls or yourself. If you grow so big there's no spot to put a new fruit, you win the game and my respect. If you lose, just refresh the page to have a go at it again.
The code could use a better UI, as the focus was put on logic and not prettiness. It could definitely use less developing tools, but what modern thing can you do these days without babel/webpack/etc?