コード例 #1
0
 public void DisplayWinner(Herd herd, Fleet fleet)
 {
     if (herd.HasSurvivors() == true)
     {
         Console.WriteLine("Winner winner chicken dinner!!!\nTeam Dinosaur is victorious!!!");
     }
     else
     {
         Console.WriteLine("Winner winner chicken dinner!!!\nTeam Robot is victorious!!!");
     }
 }
コード例 #2
0
 public void HealRemainingCompetitors(Herd herd, Fleet fleet)
 {
     foreach (Dinosaur dino in herd.dinosaurs)
     {
         dino.RegenHealth();
     }
     foreach (Robot robot in fleet.robots)
     {
         robot.RegenHealth();
     }
 }
コード例 #3
0
        public void DisplayStats(Herd herd, Fleet fleet)
        {
            foreach (Dinosaur dino in herd.dinosaurs)
            {
                Console.WriteLine(dino.DisplayStatus());
            }

            foreach (Robot robo in fleet.robots)
            {
                Console.WriteLine(robo.DisplayStatus());
            }
        }
コード例 #4
0
 public Battlefield(Herd herd, Fleet fleet)
 {
     this.herd  = herd;
     this.fleet = fleet;
 }