Exemple #1
0
        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);
        }
Exemple #2
0
 protected override string FindWord(int userId, string pattern)
 {
     return(WordDAO.FindRandomWord(Category, minNumChar));
 }
Exemple #3
0
        private bool IsWordRight(int userId, string text)
        {
            var LastUsedChar = GetLastUsedChar(userId);

            return(LastUsedChar == text.ToLower()[0] && WordDAO.IsCorrectWord(text, Category.Name));
        }