Beispiel #1
0
        public bool CheckIfLargeAnimalIsSafe(Wagon wagon)
        {
            if (wagon.hasCarnivoreL)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        public bool CheckIfSmallAnimalIsSafe(Wagon wagon)
        {
            if (wagon.hasCarnivoreS || wagon.hasCarnivoreM || wagon.hasCarnivoreL)
            {
                return(false);
            }

            return(true);
        }
Beispiel #3
0
 public void AddAnimalL(Animal animal, Wagon wagon)
 {
     animalsInWagon.Add(animal);
     animals.Remove(animal);
     Console.WriteLine(animal.species);
     wagonPoints += 5;
     if (animal.eatsMeat)
     {
         wagon.hasCarnivoreL = true;
     }
 }
Beispiel #4
0
        public void NewWagon()
        {
            Console.WriteLine("Nieuwe wagon!");
            Wagon wagonNew = new Wagon();

            foreach (Animal animal in animals)
            {
                wagonNew.animals.Add(animal);
            }
            wagonNew.Fill();
        }