Bulls aren't running! (bGameIsWon is not triggering)

Hi all,

For some reason my bGameIsWon is not triggering to be true after I enter the correct isogramic word. This happens with isograms of any length.
I was expecting the game to complete, and for the AskToPlayAgain() method to trigger, but the while loop in PlayGame() continues. The tries are incremented, and it prompts the user to enter enother guess, although the number of Bulls displayed is the same number of letters as there are in the hidden word.
This may have been unnecessary, but I added a temporary method in the FBullCowGame class called GetHiddenWord() to directly compare the hidden isogram to the guessed word.
I am directly setting the boolean bGameIsWon in the SubmitValidGuess() method, after both for loops, before the return statement.
bGameWon = (BCCount.Bulls == HiddenWordLength);
return BCCount;
Attached is an image of output when the hidden word is “planet”. Note the output includes extra debug std::cout statements which provide the value of BCGame.IsGameWon(), and compares the values of Guess to BCGame.GetHiddenWord().
UnrealS02_L43_Output
Any advice would be appreciated,

Thank you

Experiencing the exact same error-less error right now; disappointed this has no replies :frowning:

Welp, just went through the lecture change doc with a comb until finding my mixup - I had the PlayGame while-loop statement OUTSIDE the for loop instead of INSIDE. Fixed it. Might be a totally different issue for you; hope you find/found a solution.

Privacy & Terms