reset password
Author Message
Schnitzcel
Posts: 7
Posted 23:45 Feb 25, 2013 |

I'm having trouble with keeping the scores. Whenever I try playing again, the current score doesn't add up to the previous one.

EDIT: Please don't post code to the forums.

Last edited by kknaur at 07:55 Feb 26, 2013.
kknaur
Posts: 540
Posted 07:58 Feb 26, 2013 |

I think you might be misreading the directions.  You don't need to get any user input.  You just have to simulate a game.  Basically you roll the dice one time and check the sum.  If the sum is a certain value the user wins, if the sum is another value they lose, and if the sum is one of the other values then they establish what's call a point.  So lets say I roll 4 and 4 so the sum is 8 and the point would be 8.  From this point on you continue to roll the dice over and over until the dice come up with the same point (8 in this case) or a 7.  If the same point comes up then the user wins, however if a 7 comes up then they lose.  My examples only show the first and/or the first and last rolls.  You don't actually see every roll in between.

Schnitzcel
Posts: 7
Posted 12:57 Feb 26, 2013 |

So the game ends if a second 7 is rolled and when the same point value is rolled?

kknaur
Posts: 540
Posted 13:12 Feb 26, 2013 |

The game ends when the user rolls the same point OR when they roll a 7 after the first roll.  If they roll a 7 they lose, if they roll the same point they win.