public void DoBattle(Herd herd, Fleet fleet) // master method { while (herd.herdHealth > 0 && fleet.fleetHealth > 0) { FleetAttackResults(herd, fleet); if (herd.herdHealth > 0) { HerdAttackResults(fleet, herd); } } if (fleet.fleetHealth > 0) { Console.WriteLine("Winner is Team Robot "); Console.ReadLine(); } else { Console.WriteLine("Winner is Team Dinosaur "); Console.ReadLine(); } //Console.WriteLine(fleet.WarriorList[0].robotName); }
public void HerdAttackResults(Fleet fleet, Herd herd) { fleet.fleetHealth = fleet.fleetHealth - herd.herdHealth; Console.WriteLine("Fleet health = " + fleet.fleetHealth); Console.ReadLine(); }
public void FleetAttackResults(Herd herd, Fleet fleet) { herd.herdHealth = herd.herdHealth - fleet.fleetAttackPower; Console.WriteLine("Herd health = " + herd.herdHealth); Console.ReadLine(); }