예제 #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));
        }
예제 #2
0
 public List <Word> GetWords()
 {
     return(WordDb.GetList());
 }
예제 #3
0
 private List <Word> GetTotalWords()
 {
     return(WordDb.GetList());
 }