I\'ve created this program. it compiles and runs and everything works well excep
ID: 3555009 • Letter: I
Question
I've created this program. it compiles and runs and everything works well except for one thing. My problem is that when the player holds or gets a 1 his scores resets to 0 instead of keeping his old scores and starting back at the same score he was before. The rules are the following :
The game of Pig is a simple two player dice game in which the first player to reach 100 or more points wins. Players take turns. On each turn a player rolls a six-sided die. After each roll:
? If the player rolls 2
Explanation / Answer
your code is running absolutely fine......................
according to the rule in continuation of rolling if user rolls 1 he will get 0 for that round.
so in order to have non zero score for the player ..he must hold at some point before rolling 1...........
so...................
roll for the user few times and then hold and check users total score(u will see correct output in your program)......................do this few times and see the effect
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.