Пример #1
0
        bool IsCapturable(IPlayer player, IPiece movingPiece, IPiece targetPiece)
        {
            bool canMovingPieceTakePiece = movingPiece.CanTakePiece();
            bool isPieceCapturable       = targetPiece.IsCapturable();
            bool isSameOwner             = targetPiece.Owner == player;

            return(canMovingPieceTakePiece && isPieceCapturable && !isSameOwner);
        }