public static void AskForWordInput() { Console.WriteLine("Please enter a word containing only letter characters. Multiple words cannot be used."); string userWord = Console.ReadLine(); Scrabble scrabble = new Scrabble(userWord); bool ismultipleWords = scrabble.CheckIfMultipleWords(); if (ismultipleWords) { Error(); AskForWordInput(); } else { bool isScoreZero = scrabble.CheckIfNonLettersOrEmpty(); if (isScoreZero) { Console.WriteLine("Score is equal to 0."); } else { int score = scrabble.CalculateScore(); Console.WriteLine("The score value for your word is:"); Console.WriteLine(score); } } }
public void CheckIfMultipleWords_ChecksStringForMultipleWordsReturnsTrueIfMoreThanOneWord_True() { Scrabble newWord = new Scrabble("Hello hi"); bool result = newWord.CheckIfMultipleWords(); Assert.AreEqual(true, result); }