Pig the dice game/Player: Difference between revisions

Content added Content deleted
m (→‎{{header|Sidef}}: minor code fix)
m (added a ;Task: (bold) header.)
Line 1: Line 1:
{{task}}
{{task}}

__FORCETOC__
;Task:
The task is to create a dice simulator and scorer of [[Pig the dice game]] and add to it the ability to play the game to at least one strategy.
Create a dice simulator and scorer of [[Pig the dice game]] and add to it the ability to play the game to at least one strategy.
* State here the play strategies involved.
* State here the play strategies involved.
* Show play during a game here.
* Show play during a game here.



As a stretch goal:
As a stretch goal:
* Simulate playing the game a number of times with two players of given strategies and report here summary statistics such as, but not restricted to, the influence of going first or which strategy seems stronger.
* Simulate playing the game a number of times with two players of given strategies and report here summary statistics such as, but not restricted to, the influence of going first or which strategy seems stronger.



;Game Rules:
;Game Rules:
Line 15: Line 18:
# '''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.
# '''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 one. The player's 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 one. The player's turn finishes with play passing to the next player.



;Reference
;Reference
* [[wp:Pig (dice)|Pig (dice)]]
* [[wp:Pig (dice)|Pig (dice)]]
<br><br>


=={{header|Ada}}==
=={{header|Ada}}==