Exemple #1
0
        public bool CheckLosePlay(string text)
        {
            if (_wordsRepository.GetWordsStartingLike(text).Count().Equals(0))
            {
                return(true);
            }

            if (_wordsRepository.ContainsWord(text))
            {
                return(true);
            }

            return(false);
        }
Exemple #2
0
        private IEnumerable <string> GetMatches(string text)
        {
            var pattern = new Regex(@"\W");

            return(pattern.Split(text).Where(word => _repository.ContainsWord(word)));
        }