$ python twodicepig.py **** Two-Dice Pig v0.1 **** Let's play two-dice pig. Here are the rules: - to win you have to get to 100 (or above) - on your turn, roll the two dice repeatedly until either a 1 is rolled, or you decide to 'hold' - if you decide to 'hold' your turn total is added to your game total - for the two rolled dice: * if neither shows a 1, add their sum to your turn total * if a single 1 is rolled, your turn ends and your turn total is zero * if double-1's are rolled, your *game* total is reset to zero (and your turn ends) ========================================== Current Scores: computer= 0 user= 0 ========================================== Roll(r),Hold(h),Quit(q): roll >> ROLL: 3 6 >> TURN: 9 Roll(r),Hold(h),Quit(q): pony Please enter roll, hold, or quit... Roll(r),Hold(h),Quit(q): r >> ROLL: 4 5 >> TURN: 18 Roll(r),Hold(h),Quit(q): r >> ROLL: 1 5 >> TURN: 0 ******************** my turn!!!! >> ROLL: 2 6 >> ROLL: 2 6 >> ROLL: 3 2 I'll stick with that! ========================================== Current Scores: computer= 21 user= 0 ========================================== Roll(r),Hold(h),Quit(q): q ...quitter! :(Return to Lab 07