Search:

Type: Posts; User: m49er704

Search: Search took 0.08 seconds.

  1. Re: help with when the for loop is met and i want to run the while loop again

    still having some trouble with the x = 3 in the loop. heres how it looks now

    for(int x = 0; x < 3 && hasWon == false; x++)
    {
    if(game1.getAnswer() == guess)
    ...
  2. Re: help with when the for loop is met and i want to run the while loop again

    Oh ok I understand.
    Yes I encountered that. Well I can't say if x > 3 because the loop only runs 3 times ?
    I tried if(guess != getANswer()
    { "you lose"}
    But that will tell you that you lose no...
  3. Re: help with when the for loop is met and i want to run the while loop again

    no it didn't work
    do you mean turning it from true back to false?
    that's what it seems like its doing. when the user win it will not enter the for loop again?
    im just confused on how to fix that
  4. Re: help with when the for loop is met and i want to run the while loop again

    well I put

    hasWon = false; in the else statement
  5. help with when the for loop is met and i want to run the while loop again

    when the guess is the same as the dice roll and i enter yes again it only lets me enter the guess. then its asks me if i want to go again instead of running three rolls

    --- Update ---

    import...
Results 1 to 5 of 5