The game is playable here.
This game is the result of a project I was assigned as an exercise to learn JavaScript. The objectives were to move DOM elements on the page, react to keypresses, and detect collisions. The game had to have an element that could be controlled and an element that served as food that would go to a different position when it was touched.
The window loads onto a grassy background with margins. The container contains 4 elements: a snake, a mouse, a scoreboard, and a collage of items.
The objective is to lead the snake to the mouse(wherever he is on the screen). When the mouse is 'eaten', he reappears in a random place on the screen. At the same time, the number in the scoreboard goes up per mouse 'eaten'. The mouse can 'hide' behind different objects in the active area so the game has an extra element of playing. Use the arrow keys to chase the mouse and repeat until satisfied.
The game was made for fun and as a learning objective. The images used are not mine but are used as a student for learning purposes.