public void GetScrabbleScore_WordWithLetterD_True() { ScrabbleScore testScrabbleScore = new ScrabbleScore(); int result = testScrabbleScore.GetScrabbleScore("D"); Assert.AreEqual(2, result); }
public static void Main() { Console.WriteLine("Enter a word and I'll return how much it will score in Scrabble! Note that I will only check the first word"); Console.WriteLine("Also, I will not check for word length, and I won't apply any bonuses like using all 7 tiles"); ScrabbleScore scrabbleScore = new ScrabbleScore(); string userInputString = Console.ReadLine(); (@"^a-z").Replace(userInputString, string.Empty); userInputString = userInputString.Split()[0]; int finalScore = scrabbleScore.GetScrabbleScore(userInputString); Console.WriteLine($"{userInputString} is worth {finalScore} points!"); }
public void ScrabbleScore_GetLetterScore() { ScrabbleScore testScrabbleScore = new ScrabbleScore(); Assert.AreEqual(2, testScrabbleScore.GetScrabbleScore("!Aa@")); }