Beispiel #1
0
        public IResponse Attack(IPieceModel defender)
        {
            var attack = defender.TakeDamage(this);

            if (attack.Failed)
            {
                return(attack);
            }
            var defend = TakeDamage(defender);

            if (defend.Failed)
            {
                return(defend);
            }
            if (defender.Dead.Value && !Dead.Value)
            {
                return(Board.Move(this, defender.Coord.Value));
            }

            return(Response.Ok);
        }