private void AppendHiddenWord(StringBuilder builder, HiddenWord currentWord, bool includeSolution) { //Replaced by OL of sentences //builder.AppendLine($@"<td width=""250"" class=""normal"">{currentWord.SentenceHidingWord}</td>"); int numberOfPrecedingEmptyCells = CombinedKeyIndex - currentWord.KeyIndex; string uppercaseCurrentWord = currentWord.Word.ToUpperInvariant(); for (int index = 0; index < CombinedLength; index++) { if (index < numberOfPrecedingEmptyCells) // cells before word { AppendCell(builder, @"hollow", @" "); continue; } if ((CombinedKeyIndex + currentWord.LettersAfterIndex) < index) //cells after word { AppendCell(builder, @"hollow", @" "); continue; } string letterInWord = " "; if (includeSolution) { letterInWord = uppercaseCurrentWord[index - numberOfPrecedingEmptyCells].ToString(); } string classAttributes = "normal centered"; if (index == CombinedKeyIndex) { classAttributes = "bold centered"; } AppendCell(builder, classAttributes, letterInWord); } builder.AppendLine("</tr>"); }
public void AddWord(HiddenWord hiddenWordToAdd) { _hiddenWords.Add(hiddenWordToAdd); }