Spaces are filtered on initialization #2

This commit is contained in:
2017-05-01 19:47:10 +02:00
parent 9bc95c07af
commit 6dfcfcd4ac

View File

@@ -52,8 +52,12 @@ void initGuessWord(game_state *gs) {
getstr(gs->guessWord);
gs->wordLength = strlen(gs->guessWord);
for (i = 0; i < gs->wordLength; i++) {
if (gs->guessWord[i] == ' ') { //Check for spaces if it's a sentence
gs->currentWord[i] = ' ';
} else {
gs->currentWord[i] = '_';
}
}
clear(); //clear the screen
}