private static void Main() { var tank = new ImportedTank(); var mechanic = new Mechanic(); Console.WriteLine("Tank is broken: {0}", tank.IsBroken); mechanic.Repair(tank); Console.WriteLine("After repairs: {0}", tank.Health); Console.WriteLine("Enemy on the left! Turn turret!"); for (var i = 0; i < 15; i++) { if (tank.Bullets.Count > 0) { tank.Fire(); tank.Hit(10); Console.WriteLine("Enemy hit! HP: {0}", tank.Health); } } }
public void Init() { _mechanic = new Mechanic(); }