User inputs player names, pushes submit button and game begins |
2 user names, hit submit |
user names are displayed on page and user 1 is prompted to 'roll' |
User 'rolls' and is given their total score, the value of their dice roll and the value of the total points accrued on their turn |
press dice roll button |
total score is displayed, value of 'roll' is displayed, value of turn points displayed, user is given option to roll again or 'hold' |
if roll value equals 1, next player is given a 'turn' and prompted to roll |
roll value=1 |
no points are added to player 1's total score, player2 is prompted to begin their turn by rolling dice |
if roll value is other than 1, roll value is added to turn points and user is prompted to either role again or hold |
roll value > 1 |
roll value added to turn points, prompts user to roll again or hold |
If player elects to hold, turn points are added to that players total points and next player is prompted to roll |
user clicks hold button |
turn points added to total points, next player prompted to begin their turn by rolling dice |
When either players total points exceed 100, that player is declared the winner and the game is over |
players total points >= 100 |
game announces winner, ends game |