I'm creating a simple hangman game in which the console prints blanks, and if a character that is in the word to be guessed is entered by the user, i want a blank to be removed. This way once all the correct letters are entered there wont be any blanks, and the game will be won. Im stuck on how I should remove a blank if a correct letter is entered.
I'm using this as my method to generate blanks:
string blanks = "-";
for (int i = 0; i < wordlength; i++)
{
blanks += "-";
}
where wordlength is the length of the word, defined earlier in the code (as is the word itself to be guessed). I don't know how i should remove the blanks however after a correct letter is entered. If any elaboration is necessary please specify as to what and i'll do my best to make it clearer.