Pig game made with javascript
Pig is a simple dice game which in its basic form is playable with just a single die. You win by being the first player to score 100 or more points.
To play this version of the game you'll need 2 players.
The score is reset if any player rolls a 1.
Choose a player to go first. That player throws a die and scores as many points as the total shown on the die providing the die doesn’t roll a 1. The player may continue rolling and accumulating points (but risk rolling a 1) or end his turn.
If the player rolls a 1 his turn is over, he loses all points he accumulated that turn, and he passes the die to the next player.
Play passes from player to player until a winner is determined.
The first player to accumulate 100 or more points wins the game.