public bool CheckLosePlay(string text) { if (_wordsRepository.GetWordsStartingLike(text).Count().Equals(0)) { return(true); } if (_wordsRepository.ContainsWord(text)) { return(true); } return(false); }
private IEnumerable <string> GetMatches(string text) { var pattern = new Regex(@"\W"); return(pattern.Split(text).Where(word => _repository.ContainsWord(word))); }