Created
October 6, 2017 22:36
-
-
Save anonymous/3737f853a18e0ae704e0704fe7f4ac43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void PlayGame() | |
{ | |
//loop for COUNT_MAX number asking for guesses | |
constexpr int COUNT_MAX = 5; | |
for (int count = 1; count <= COUNT_MAX; count++) { | |
string GuessBack = GetGuess(); | |
cout << "You typed: " << GuessBack << endl; | |
cout << endl; | |
} | |
} | |
// get a guess from the player | |
string GetGuess() | |
{ | |
string Guess = ""; | |
cout << "Please type your word:\n"; | |
getline(cin, Guess); | |
return Guess; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment