$ python3 pig.py
Welcome to my Pig game!
In this game, two players take turns rolling a die.
On your turn, after each time you roll a die, you score
the number you rolled. You can choose to lock in what you've
rolled so far or roll again. Be careful though! If you
roll a one you lose your turn and score zero points :(
You can keep rolling as long as you don't roll a one. Your
turn score is the total of the numbers you've rolled on this
turn. The game ends when one player reaches 50 points.
good luck!
Enter player 1 name: Joshua
Enter player 2 name: Kevin
* * * * * * * * * *
Joshua has 0 points.
Kevin has 0 points.
* * * * * * * * * *
Joshua, it is your turn.
You rolled a 5.
You have 5 points this turn.
If you stop now you would have 5 points.
Do you want to stop? no
You rolled a 4.
You have 9 points this turn.
If you stop now you would have 9 points.
Do you want to stop? no
You rolled a 5.
You have 14 points this turn.
If you stop now you would have 14 points.
Do you want to stop? nope
Please Enter 'yes' or 'no'
Do you want to stop? no
You rolled a 5.
You have 19 points this turn.
If you stop now you would have 19 points.
Do you want to stop? no
You rolled a 1.
* * * Oh no! you lose all your points this turn. * * *
* * * * * * * * * *
Joshua has 0 points.
Kevin has 0 points.
* * * * * * * * * *
Kevin, it is your turn.
You rolled a 1.
* * * Oh no! you lose all your points this turn. * * *
* * * * * * * * * *
Joshua has 0 points.
Kevin has 0 points.
* * * * * * * * * *
Joshua, it is your turn.
You rolled a 3.
You have 3 points this turn.
If you stop now you would have 3 points.
Do you want to stop? no
You rolled a 6.
You have 9 points this turn.
If you stop now you would have 9 points.
Do you want to stop? no
You rolled a 1.
* * * Oh no! you lose all your points this turn. * * *
* * * * * * * * * *
Joshua has 0 points.
Kevin has 0 points.
* * * * * * * * * *
Kevin, it is your turn.
You rolled a 4.
You have 4 points this turn.
If you stop now you would have 4 points.
Do you want to stop? no
You rolled a 5.
You have 9 points this turn.
If you stop now you would have 9 points.
Do you want to stop? no
You rolled a 6.
You have 15 points this turn.
If you stop now you would have 15 points.
Do you want to stop? yes
* * * * * * * * * *
Joshua has 0 points.
Kevin has 15 points.
* * * * * * * * * *
Joshua, it is your turn.
You rolled a 6.
You have 6 points this turn.
If you stop now you would have 6 points.
Do you want to stop? no
You rolled a 1.
* * * Oh no! you lose all your points this turn. * * *
* * * * * * * * * *
Joshua has 0 points.
Kevin has 15 points.
* * * * * * * * * *
Kevin, it is your turn.
You rolled a 4.
You have 4 points this turn.
If you stop now you would have 19 points.
Do you want to stop? no
You rolled a 5.
You have 9 points this turn.
If you stop now you would have 24 points.
Do you want to stop? no
You rolled a 3.
You have 12 points this turn.
If you stop now you would have 27 points.
Do you want to stop? no
You rolled a 3.
You have 15 points this turn.
If you stop now you would have 30 points.
Do you want to stop? yes
* * * * * * * * * *
Joshua has 0 points.
Kevin has 30 points.
* * * * * * * * * *
Joshua, it is your turn.
You rolled a 2.
You have 2 points this turn.
If you stop now you would have 2 points.
Do you want to stop? no
You rolled a 6.
You have 8 points this turn.
If you stop now you would have 8 points.
Do you want to stop? no
You rolled a 3.
You have 11 points this turn.
If you stop now you would have 11 points.
Do you want to stop? no
You rolled a 3.
You have 14 points this turn.
If you stop now you would have 14 points.
Do you want to stop? no
You rolled a 4.
You have 18 points this turn.
If you stop now you would have 18 points.
Do you want to stop? no
You rolled a 5.
You have 23 points this turn.
If you stop now you would have 23 points.
Do you want to stop? yes
* * * * * * * * * *
Joshua has 23 points.
Kevin has 30 points.
* * * * * * * * * *
Kevin, it is your turn.
You rolled a 3.
You have 3 points this turn.
If you stop now you would have 33 points.
Do you want to stop? no
You rolled a 6.
You have 9 points this turn.
If you stop now you would have 39 points.
Do you want to stop? no
You rolled a 2.
You have 11 points this turn.
If you stop now you would have 41 points.
Do you want to stop? no
You rolled a 6.
You have 17 points this turn.
If you stop now you would have 47 points.
Do you want to stop? no
You rolled a 2.
You have 19 points this turn.
If you stop now you would have 49 points.
Do you want to stop? no
You rolled a 6.
You have 25 points this turn.
If you stop now you would have 55 points.
Do you want to stop? yes
* * * * * * * * * *
Joshua has 23 points.
Kevin has 55 points.
* * * * * * * * * *
Kevin wins!