The   game of Pig   is a multiplayer game played with a single six-sided die.   The
object of the game is to reach   100   points or more.  
Play is taken in turns.   On each person's turn that person has the option of either:

 Rolling the dice:   where a roll of two to six is added to their score for that turn and the player's turn continues as the player is given the same choice again;   or a roll of   1   loses the player's total points   for that turn   and their turn finishes with play passing to the next player.
 Holding:   the player's score for that round is added to their total and becomes safe from the effects of throwing a   1   (one).   The player's turn finishes with play passing to the next player.


Task

Create a program to score for, and simulate dice throws for, a two-person game.



Related task

   Pig the dice game/Player


DynamicModule[{score, players = {1, 2}, roundscore = 0, 
  roll}, (score@# = 0) & /@ players; 
 Panel@Dynamic@
   Column@{Grid[
      Prepend[{#, score@#} & /@ players, {"Player", "Score"}], 
      Background -> {None, 2 -> Gray}], roundscore, 
     If[ValueQ@roll, Row@{"Rolled ", roll}, ""], 
     If[IntegerQ@roundscore, 
      Row@{Button["Roll", roll = RandomInteger[{1, 6}]; 
         If[roll == 1, roundscore = 0; players = RotateLeft@players, 
          roundscore += roll]], 
        Button["Hold", score[players[[1]]] += roundscore; 
         roundscore = 0; 
         If[score[players[[1]]] >= 100, roll =.; 
          roundscore = Row@{players[[1]], " wins."}, 
          players = RotateLeft@players]]}, 
      Button["Play again.", 
       roundscore = 0; (score@# = 0) & /@ players]]}]