コード例 #1
0
        public void TestGetString()
        {
            var letterManager = new LetterManager();
            var letterA = new Letter('a', 0);
            letterManager.AddLetter(letterA);
            var letterB = new Letter('b', 2);
            letterManager.AddLetter(letterB);
            letterManager.AddLetter(new Letter('c', 5));

            Assert.AreEqual("a b  c", letterManager.GetString());
        }
コード例 #2
0
 public void TestAddingLetters()
 {
     var letterManager = new LetterManager();
     var letterA = new Letter('a', 0);
     letterManager.AddLetter(letterA);
     var letterB = new Letter('b', 2);
     letterManager.AddLetter(letterB);
     letterManager.AddLetter(new Letter('c', 5));
     Assert.AreEqual(letterA, letterManager.GetElementAt(0));
     Assert.AreEqual(letterB, letterManager.GetElementAt(2));
     Assert.AreEqual(new Letter('c', 5), letterManager.GetElementAt(5));
 }
コード例 #3
0
 void TypeLetter(string c)
 {
     if (puzzle.UseLetter(c[0]))
     {
         entry.AddLetter(c[0]);
     }
 }