Snake Game

github | live link

Built with: HTML, CSS, Javascript

The very popular retro Snake game. Click the start button to start the game. Change direction of the snake by using the left, right, up and down arrows. Keep an eye on the score. Do not colide with self or walls. After a finished game click the play button again to reset the score to 0 and start playing again.

Really fun project to build - and play!! It's full of Javascript functions and methods. Creating the grid with a forEach function. Adding that grid to an array with the push function. Adding event listeners to the arrow keys. Generating an apple with the help of Math.floor and Math.random functions. Adding on the length of the snake. Increasing the speed of the snake. Reseting everyhing at the end. Just an amazing project to build.