/Pig-Dice

Source code for pig dice game.

Primary LanguagePython

Pig-Dice

Code author: Md. Minul Islam Shovon (ECE, RUET)

About Pig Dice

Pig is a simple dice game first described in print by John Scarne in 1945. As with many games of folk origin, Pig is played with many rule variations. Commercial variants of Pig include Pass the Pigs, Pig Dice and Skunk. Pig is commonly used by mathematics teachers to teach probability concepts.

Pig is one of a family of dice games described by Reiner Knizia as "jeopardy dice games". For jeopardy dice games, the dominant type of decision is whether or not to jeopardize previous gains by rolling for potential greater gains. Most jeopardy dice games can be further subdivided into two categories: jeopardy race games and jeopardy approach games. In jeopardy race games, the object is to be the first to meet or exceed a goal score (e.g. Pig, Pass the Pigs, Cosmic Wimpout, Can't Stop). In jeopardy approach games, the object is to most closely approach a goal score without exceeding it.

Each turn, a player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold":

  • If the player rolls a 1, they score nothing and it becomes the next player's turn.
  • If the player rolls any other number, it is added to their turn total and the player's turn continues.
  • If a player chooses to "hold", their turn total is added to their score, and it becomes the next player's turn.

The first player to score 100 or more points wins.

For example, the first player, Donald, begins a turn with a roll of 5. Donald could hold and score 5 points, but chooses to roll again. Donald rolls a 2, and could hold with a turn total of 7 points, but chooses to roll again. Donald rolls a 1, and must end his turn without scoring. The next player, Alexis, rolls the sequence 4-5-3-5-5, after which she chooses to hold, and adds her turn total of 22 points to her score.

Source: Wikipedia