Anonymous user
Pig the dice game: Difference between revisions
→{{header|C}}
(Added C code for the gam,e) |
|||
Line 786:
</lang>
Output:
<pre>
Player 1 - You have 0 total points and 0 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 2
Player 1 - You have 0 total points and 2 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 2
Player 1 - You have 0 total points and 4 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 4
Player 1 - You have 0 total points and 8 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 5
Player 1 - You have 0 total points and 13 points this turn
What do you want to do (1)roll or (2)hold: 2
You holded, you have 13 points
Player 2 - You have 0 total points and 0 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 5
Player 2 - You have 0 total points and 5 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 6
Player 2 - You have 0 total points and 11 points this turn
What do you want to do (1)roll or (2)hold: 1
You rolled a 3
Player 2 - You have 0 total points and 14 points this turn
What do you want to do (1)roll or (2)hold:
</pre>
=={{header|C++}}==
|