When asked to do the challenge for this lecture I made it work, but did it differently.
I would like to know if the way I did it is ok and if not, why?
In the FBullCowGame.h I declared a new function called
void PrintGameSummary ();
Then in the CPP I defined it as follows:
void FBullCowGame::PrintGameSummary()
{
if (bIsGameWon) {
std::cout << “You WON!!!\n”;
}
else
{
std::cout << “You lose :((\n”;
}
return;
}
Because I did this, I also did a #include iostream within the CPP.
then in main.cpp I just added the following to the bottom of PlayGame
// TODO summarize game
BCgame.PrintGameSummary();
return;