Each turn, a player repeatedly rolls a die. After each roll, the player decides whether to 'hold' or roll again. If a 1 is rolled, the player scores nothing for that turn, and it becomes the next player's turn. The first player to get 100 points wins. The app displays the current roll and total score for each player.
Spec | Input | Output |
---|---|---|
Game will generate a random number between 1 and 6 | User presses 'roll' | 4 |
If the number is 1, the turn is ended and the total for the turn is zero | User presses 'roll' | 1 - Your turn is over. |
If the player decides to hold, the turn score is added to the total. | User presses 'hold' | Total score: 16 |
Run the following commands in Terminal:
$ git clone
this repository$ cd pig-dice
$ open index.html
There are no known bugs at this time.
Practice writing JavaScript functions.
Add some styling to the user interface.
If you have questions, comments, or concerns, please contact Margaret. Feel free to make a contribution to the code.
- HTML
- CSS
- Bootstrap
- JavaScript
- jQuery
This software is licensed under the MIT license.
Copyright (c) 2017 Margaret Berry and John Parsons