static void Main(string[] args) { Marine m1 = new Marine(); Firebat f1 = new Firebat(); TakeRandomDamageForMarine(m1); TakeRandomDamageForFirebat(f1); }
static void TakeRandomDamageForMarine(Marine marine) { int damage = _random.Next(1, 6); while (damage > 0) { damage--; marine.HP--; } Console.WriteLine(marine.ToText()); }