Activity for Epicodus
By Peter Grimm, Allison Sadin, Megan Hepner 05.29.2020
A page that plays pig dice, created as an exercise to practice with constructors, prototypes, objects, properties, methods, jQuery and DOM manipulation and traversal.
| Behavior | Input | Output |
|---|---|---|
| If start game is pressed, starts a new game, activates player 1 turn | click start game | |
| A player can roll the dice and get back a value between 1 and 6 | click roll | 3 |
| If the value is between 2 and 6, it gets added to turn total | 3 | |
| If the value is 1, add zero to total score, switch player turn | 0 | |
| If the player clicks hold, add turn total to score, switch player turn | click hold | add value to score |
| If a player score reaches 100, player wins, game is over | 100 | game over |
- Clone this repository
- Browse to the
pig-dicefolder - Open
index.htmlin a browser of your choice
HTML
CSS
Bootstrap
jQuery
Javascript
Copyright (c) 2020, Peter Grimm, Allison Sadin, Megan Hepner
This software is licensed under the MIT license.