Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion prove/Develop03/word.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ public string DisplayWord()
// this method checks wether or not a word is hidden and what to display if that is true or not
if(_isHidden)
{
return "_";
// this is a comment for the pull request. I used to just return a single underscore for each word
// I have now fixed it with this simple for loop that gets the word length and replaces the whole
// word with underscores
int numberOfLetters = _text.Length;
string placeholder = "";
for(int i = 0; i < numberOfLetters; i++)
{
placeholder += "_";
}
return placeholder;
}
else
{
Expand Down