private void AttackGamer() { foreach (Alien alien in Swarm.Aliens) { Peter.RemoveLives(alien.SizeOfAttack); } Console.WriteLine($"Peter's lives after current attack is {Peter.Lives}"); }
public void Begin() { Swarm.DisplayListOfAliens(); while (Peter.IsAlive() && Swarm.IsAlive()) { BattleStep(); } }
public void TestDefaultArgs(IResultSink res) { Peter p = new Peter(); p.SetSink(res); p.TellYourAge(); // expected -1, result: -1 p.DoSomething(); // expected -1, result: 0 Fred f = new Fred(); f.SetSink(res); f.TellYourAge(1); // expected 1, result: 1 f.DoSomething(); // expected 1, result: 1 }