JavaScript Pig, Dice Game Example

Pig is a dice game, involving two players, playing in rounds. In each turn, a player rolls a dice as many times as they wish. Each result gets added to their round score. If, however, a player rolls a one, their round score returns to zero, after which, it's the next player's turn. A player can choose to 'hold', which means that their round score gets added to their overall score and play returns to the opponent. The first player to reach 100 points overall wins the game.

Player 1
Player 2