Exemple #1
0
        static void Main(string[] args)
        {
            Marine  m1 = new Marine();
            Firebat f1 = new Firebat();

            TakeRandomDamageForMarine(m1);
            TakeRandomDamageForFirebat(f1);
        }
Exemple #2
0
        static void TakeRandomDamageForFirebat(Firebat firebat)
        {
            int damage = _random.Next(1, 6);

            while (damage > 0)
            {
                damage--;
                firebat.HP--;
            }

            Console.WriteLine(firebat.ToText());
        }