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)); }
public List <Word> GetWords() { return(WordDb.GetList()); }
private List <Word> GetTotalWords() { return(WordDb.GetList()); }