protected override string FindWord(int userId, string pattern) { var UsedWords = GetUsedWords(userId); var word = "не нашлось"; var words = WordDAO.FindWordsStartWith(pattern, Category.Name).GetEnumerator(); while (words.MoveNext()) { if (!UsedWords.Contains(words.Current)) { word = words.Current; break; } } return(word); }
protected override string FindWord(int userId, string pattern) { return(WordDAO.FindRandomWord(Category, minNumChar)); }
private bool IsWordRight(int userId, string text) { var LastUsedChar = GetLastUsedChar(userId); return(LastUsedChar == text.ToLower()[0] && WordDAO.IsCorrectWord(text, Category.Name)); }