示例#1
0
        public MoveOutcome TryTake(Move move)
        {
            Piece currentPiece = board[move.CurrentRow, move.CurrentCol];

            if (currentPiece.CanAttackPosition(move, this))
            {
                TakePiece(move);
            }
            else
            {
                return(MoveOutcome.Illegal);
            }

            return(MoveOutcome.Success);
        }