So I’m just wondering something…
In int main we do the loop to get PlayGame() going.
int main(){
PrintIntro();
do {
PlayGame();
}while (AskToPlayAgain() == true);
}
Inside of PlayGame we call BCGame.Reset()
void PlayGame() {
BCGame.Reset();
inside of BCGame.Reset() we set bIsGameWon to false;
void FBullCowGame::Reset()
{
constexpr int32 MAX_TRIES = 8;
const FString HIDDEN_WORD = "antlers";
bIsGameWon = false;
Because we set bIsGameWon to false in Reset() that gets called everytime we want to play the game again; We dont have to set in anywhere else.
Why set the bIsGameWon to false every time we make a guess that is of the correct length and as long the counter is not the same as WordLength?
if (BullCowCount.Bulls == MyHiddenWord.length()) {
bIsGameWon= true;
}
else{
BIsGameWon = false;
}
Makes no sense at this point of the game astleast.
Cheers!