-
Notifications
You must be signed in to change notification settings - Fork 1
aapiane09/idlegame
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# Don't Do Anything - [Idle Game](https://github.com/aapiane09/idlegame) <img src="https://cloud.githubusercontent.com/assets/7833470/10423298/ea833a68-7079-11e5-84f8-0a925ab96893.png" width="100"> ## Template - Title In this game, you do nothing to win! If you move your mouse or click your keyboard, your points will stop increasing. You can also spend your points to increase your points-per-tick multiplier, and get to 10000 points even faster! See the published project at [github.com/aapiane09/idlegame](https://github.com/aapiane09/idlegame)! ## Technologies Used <li> HTML </li> <li> CSS </li> <li> Bootstrap </li> <li> JavaScript + jQuery</li> ## Code I'm Proud Of ``` function incrementPoints () { points += (.1 * multiplier); $('#points').text(Math.round(points)); $('#gif').html('<img class="resize" src="assets/images/mario-coins.gif">'); //Toggle clickability of upgrades if (points >= lowCost) { $('#loUpgrade').removeAttr('disabled'); } else { $('#loUpgrade').attr('disabled', 'disabled'); }; if (points >= medCost) { $('#medUpgrade').removeAttr('disabled'); } else if (points < medCost) { $('#medUpgrade').attr('disabled', 'disabled'); }; if (points >= hiCost) { $('#hiUpgrade').removeAttr('disabled'); } else if (points < hiCost) { $('#hiUpgrade').attr('disabled', 'disabled'); }; //Show button to win game if (points >= 10000) { $('section').html('<button type="button" id="winbutton" data-toggle="modal" data-target=".bs-example-modal-lg" class="btn btn-primary btn-lg btn-block btn-danger">WIN</button>'); winGame() } else { $('section').html('<section><img src="assets/images/placeholder.png"></section>'); }; }; ``` ### Screen Shots http://imgur.com/a/AEayR ### To-Do List <li>Have a clicker to increment points manually</li> <li>Have a multiplier based on how long you've gone without triggering event listeners</li> <li>Set a three second window in between triggering an event listener and reinitiating the increment function</li> <li>Set toggleable background music</li> <li>Set event listener to click R to reset game without refreshing window</li>
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published