/epicodus-pig-dice-TDD

Test Driven Development added to dice game

Primary LanguageJavaScript

Pig Dice

__

By Drake Wilcox and Jeremy Kale Padot

______           _          _    _ _ _                             _                  
|  _  \         | |        | |  | (_| |                           | |                 
| | | |_ __ __ _| | _____  | |  | |_| | ___ _____  __            / __)                
| | | | '__/ _` | |/ / _ \ | |/\| | | |/ __/ _ \ \/ /            \__ \                
| |/ /| | | (_| |   |  __/ \  /\  | | | (_| (_) >  <             (   /                
|___/_|_|  \__,_|_|\_\___|  \/  \/|_|_|\___\___/_/\_\      ______ |_|     _       _   
  |_  |                               | | / /     | |      | ___ \       | |     | |  
    | | ___ _ __ ___ _ __ ___  _   _  | |/ /  __ _| | ___  | |_/ __ _  __| | ___ | |_ 
    | |/ _ | '__/ _ | '_ ` _ \| | | | |    \ / _` | |/ _ \ |  __/ _` |/ _` |/ _ \| __|
/\__/ |  __| | |  __| | | | | | |_| | | |\  | (_| | |  __/ | | | (_| | (_| | (_) | |_ 
\____/ \___|_|  \___|_| |_| |_|\__, | \_| \_/\__,_|_|\___| \_|  \__,_|\__,_|\___/ \__|
                                __/ |                                                 
                               |___/    

Clone this repository to your desktop

  • For a mac, run the following commands from your home terminal to view the page
  • cd-desktop
  • cd pig-dice
  • open index.html in your browser

Specifications

When user clicks "Roll" button a random number between 1 and 6 is generated Inpuut: Click Output: 4 If the number generated is 1 the value is returned as a 0 Input: 1 Output: 0 If the number generated is a 2-6, that value is returned.
input: 3 Output: 3 When a user clicks "Roll" for a second time, the new generated number is added to the turntotal. input: 4 Output: previous number + 4 = turntotal If the number generated is a 1, the turntotal is multiplied by 0 input: 1 Output: Turntotal = 0 When the user clicks on a "Hold" button, the current total is added to a new value of score total. input: click on "hold" output: turntotal + scoretotal When the user clicks on the "hold button," the turn total returns to zero. input: click on "hold" output: turntotal = 0 If score total reaches 100 game ends and player wins. input: score total 100 output: winner

Known Bugs

No known bugs at this time

Support and contact details

Technologies Used

  • Javascript
  • jQuery
  • HTML
  • CSS
  • Bootstrap

License

This software is licensed under the MIT license

Copyright (c) 2020 Drake Wilcox and Jeremy Padot