public static void Main() { Console.WriteLine("Enter your scrabble word."); string scrabbleWord = Console.ReadLine(); ScrabbleScore wordScore = new ScrabbleScore(scrabbleWord); int score = wordScore.ScoreCalculator(); Console.WriteLine("Your scrabble word score is " + score); }
static void Main() { Console.WriteLine("Enter your word"); string userWord = Console.ReadLine(); Console.WriteLine(userWord); ScrabbleScore word = new ScrabbleScore(userWord); word.wordScore(); Console.WriteLine(word.wordScore()); }
public static void Main() { Console.WriteLine("Give me a word and I will tell you its Scrabble score!"); string word = Console.ReadLine(); if (!Regex.IsMatch(word, @"^[a-zA-Z]+$")) { Console.WriteLine("ERROR: Must give one word in English characters."); return; } ScrabbleScore scrabble = new ScrabbleScore(word); Console.WriteLine("-------------------------"); Console.WriteLine("The word '" + word + "' scores you " + scrabble.GetScore() + " points!"); }
public void Lowercase_letter() { Assert.Equal(1, ScrabbleScore.Score("a")); }
public void Entire_alphabet_available() { Assert.Equal(87, ScrabbleScore.Score("abcdefghijklmnopqrstuvwxyz")); }
public void Empty_input() { Assert.Equal(0, ScrabbleScore.Score("")); }
public void English_like_word() { Assert.Equal(8, ScrabbleScore.Score("pinata")); }
public void Long_mixed_case_word() { Assert.Equal(41, ScrabbleScore.Score("OxyphenButazone")); }
public void Medium_valuable_word() { Assert.Equal(22, ScrabbleScore.Score("quirky")); }
public void Medium_word() { Assert.Equal(6, ScrabbleScore.Score("street")); }
public void Short_valuable_word() { Assert.Equal(12, ScrabbleScore.Score("zoo")); }
public void Short_word() { Assert.Equal(2, ScrabbleScore.Score("at")); }
public void Valuable_letter() { Assert.Equal(4, ScrabbleScore.Score("f")); }
public void Uppercase_letter() { Assert.Equal(1, ScrabbleScore.Score("A")); }