Esempio n. 1
0
        public WordList GetAllWords(int num)
        {
            List <Word> words = WordDb.GetList(), ansWords = new List <Word>();

            if (num >= words.Count)
            {
                return(new WordList(words, false));
            }

            Random rand = new Random();

            while (ansWords.Count < num)
            {
                int t = rand.Next(words.Count);

                ansWords.Add(words[t]);
                words.RemoveAt(t);
            }

            return(new WordList(ansWords, false));
        }
Esempio n. 2
0
 public List <Word> GetWords()
 {
     return(WordDb.GetList());
 }
Esempio n. 3
0
 private List <Word> GetTotalWords()
 {
     return(WordDb.GetList());
 }