Which functions could be made const

Of course, GetCurrentTry() should be const, because it’s getter, it’s not supposed to change something, only return private member.
IsGameWon() is a good candidate too, because it just can compare some input from user, and if it’s an enigmatic isogram, you won, that’s it. You don’t need to change something, you just have to compare some strings and return won or not.
CheckGuessValidaty(std::string) can be a good candidate too in one implementation, i think. We can just not to interact with any class private members. We can just use construction like this CheckGuessValidaty(GetGuess()); (not sure if this is a good idea) and just compare some string inside our CheckGuessValidty function.

Privacy & Terms