// Constructor takes the animal, the input string, and whether or not the result is correct
 public SpellingResult(Animal animal, VerifiedLetterCollection verifiedInput)
 {
     this.animal = animal;
     this.verifiedInput = verifiedInput;
     this.isCorrect = verifiedInput.isCorrect;
 }
Beispiel #2
0
        public void loadAnimals()
        {
            Animal bear = new Animal("Bear");
            list.Add(bear);

            Animal cat = new Animal("Cat");
            list.Add(cat);

            Animal dog = new Animal("Dog");
            list.Add(dog);

            Animal dolphin = new Animal("Dolphin");
            list.Add(dolphin);

            Animal elephant = new Animal("Elephant");
            list.Add(elephant);

            Animal lion = new Animal("Lion");
            list.Add(lion);

            Animal shark = new Animal("Shark");
            list.Add(shark);

            Animal snake = new Animal("Snake");
            list.Add(snake);

            Animal starfish = new Animal("Starfish");
            list.Add(starfish);

            Animal turtle = new Animal("Turtle");
            list.Add(turtle);
        }
 // Constructs a new result from an animal and user input string and adds it to the results queue
 public void AddResult(Animal animal, VerifiedLetterCollection verifiedInput)
 {
     if (animal != null && verifiedInput != null)
         results.Enqueue(new SpellingResult(animal, verifiedInput));
 }