Skip to content

Lisonallie/Moving-Block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moving Block

Hello and welcome to my moving block game! ⬜🎆⬜

The game is playable here.

Why did I make this game? 🐭🐭🐭

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.

How does the game look? 🐍🐍🐍

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.

How to play the game? 1️⃣2️⃣3️⃣

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.

Permissions

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.