Ejemplo n.º 1
0
    static void Main()
    {
        Console.WriteLine("Scrabble me up a word!");
        string userInput = Console.ReadLine();

        Word gameWord = new Word(userInput);
        int  points   = gameWord.AssignPoints();

        Console.WriteLine("That word has earned you: " + points + " points");
    }
Ejemplo n.º 2
0
        public void AssignPoints_ReturnsUserPoints_Int()
        {
            string testWord   = "Hello";
            int    testPoints = 8;
            Word   newWord    = new Word(testWord);

            char[] resultArray = newWord.AssignCharArray();
            int    userPoints  = newWord.AssignPoints();

            Assert.AreEqual(testPoints, userPoints);
        }