コード例 #1
0
        public void AddScore_AddsValueToScore_Score()
        {
            string word   = "snow";
            int    result = Scrabble.AddScore(word);

            Assert.AreEqual(result, 7);
        }
コード例 #2
0
        public static void Main()
        {
            Console.WriteLine("Please enter a word to get your Scrabble score:");
            string word  = Console.ReadLine().ToLower();
            int    score = Scrabble.AddScore(word);

            Console.WriteLine($"Your score is {score}.");
        }
コード例 #3
0
        public ActionResult Scrabble(string word)
        {
            Scrabble myScrabble = new Scrabble();

            myScrabble.AddScore(word);

            return(View(myScrabble));
        }