Luke Stamper wrote:I am having trouble figuring out how to reset the random number
Luke Stamper wrote:[I am having trouble figuring out] how to use a Y/N question to initiate the end of or new beginning of the game.
I was trying to mess around with an intChoice variable (hit 1 for Yes and 2 for No) but couldn't figure it out.
Luke Stamper wrote:I wanted the loop to start with the question of, "welcome to the guessing game, please pick a number between 1 and 10." So when the game was over, the loop would start with that question and a new random number between 1 and 10.
Luke Stamper wrote:I wanted the inner loop to control game play
Luke Stamper wrote:[I wanted] the outer loop to control whether the user wants to play again or exit. However, I am unsure of what to have for the outer 'do' and the outer 'while'.
Luke Stamper wrote:I almost got it! Now I am having an issue with resetting the amount of tries it takes to guess the correct number after you restart the game.
Luke Stamper wrote:Next up...converting everything to JOptionPane...(ugh)...do you have any words of wisdom in doing this?
They match even less now. The lines were too long, so I added some new lines. At least now you can see the whole code on your screen.
Andrew Monkhouse wrote: . . . the line numbers do not match up. . . .