JS – Another simple js game with counters and click events

Recently I have started to read a little more about JS, in order to make the reviews of some JS books. Thus, this December would be JS December (or at least the first part of it! 🙂 ).

So, lets see what I have built with JS and even dared to call it a game again. Pretty much, it is a small table of divs, which are listening for the events “mouseover” and “click”:

simple_game2simple_game1

Once the event is “caught”, they increment by one or they are multiplied by -1. Some of the divs are somehow reversed, they do not go with the flow and their action is something like -10 or whatsoever.

The idea is to reach 1000, the result is written on top. If you reach it, you get a simple notice about it and you may continue. So far so good, here comes the code:

Available in GitHub here as well!

Tagged with: , ,