Example #1
0
        private bool Fight(Character aChar, IParticipant opponent)
        {
            while (!opponent.Dead && !aChar.Dead)
            {
                opponent.ReceiveDamage(aChar.DealDamage());
                if (!opponent.Dead)
                {
                    aChar.ReceiveDamage(opponent.DealDamage());
                }
            }

            return(opponent.Dead);
        }