izeimai / unit-4-game

Crystals Collector clicking game

Home Page:https://izeimai.github.io/unit-4-game/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crystals Collector Game

https://izeimai.github.io/unit-4-game/

What does this project do?

A user can click on four images (cyrstals) which are each worth a random number of points between 1-12 that are hidden to the user. The goal of the game is to click on the correct number of crystals so that the total number of points match the target random number displayed in the window. With every new click, the updated cumulative total is displayed below the images. If the user wins the game by matching the goal number, the number of games won is increased along with a result message congratulating the win. If the user loses the game by overshooting the target number, then the result message will display "You Lost" and the number of games lost is increased. In both end game conditions, the game is automatically reset with a new target number and new values assigned to each of the images.

Why is this project useful?

It familiarized me to some useful methods available through jQuery (JavaScript library) such as .each() and .text(). I've noticed how jQuery reduces code length.

About

Crystals Collector clicking game

https://izeimai.github.io/unit-4-game/


Languages

Language:HTML 79.0%Language:CSS 21.0%