Shubham Semwal wrote:Where is the player class ?
Shubham Semwal wrote:WhoWon and Die classes ?
and the class with main(). It's difficult to walkthrough without executing the program.[/quot
Here is the die class class, the whoWon is not there, it was just something else I was trying to solve the issue didnt work. Not really part of the program.
Dave Tolls wrote:Can you show an example run?
You've got lots of println's in there (which is good for debugging) so it would narrow down where the issue is.
Stephan van Hulst wrote:That's because you're still in the turn loop, not in the game loop.
The game should end when the player hits 'e'. If you want to do this automatically, you should include that logic in your turn loop.
Take a look at the example code I posted above, and include another expression that determines the value of rollAgain.
Stephan van Hulst wrote:That's because you're still in the turn loop, not in the game loop.
The game should end when the player hits 'e'. If you want to do this automatically, you should include that logic in your turn loop.
Take a look at the example code I posted above, and include another expression that determines the value of rollAgain.
Shawn Gordian wrote:I've been up for to many hours and didnt even see that I had to end the game manually.
Shawn Gordian wrote:I will however be going back into it to clean it up and make some changes just for my own sake and some more practice.
All things are lawful, but not all things are profitable.
He's my best friend. Not yours. Mine. You can have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|