docs: function Matcher(options) {
  
          options = options || {};
  
          /**
           * ### Matcher.x
           *
           * The row-index of the last returned match by Matcher.getMatch
           *
           * @see Matcher.getMatch
           */
          this.x = null;
  
          /**
           * ### Matcher.y
           *
           * The column-index of the last returned match by Matcher.getMatch
           *
           * @see Matcher.getMatch
           */
          this.y = null;
  
          /**
           * ### Matcher.matches
           *
           * Nested array of matches (with position-numbers)
           *
           * Nests a new array for each round, and within each round
           * individual matches are also array. For example:
           *
           * ```javascript
           *
           * // Matching array.
           * [
           *
           *   // First round.
           *   [ [ p1, p2 ], [ p3, p4 ], ... ],
           *
           *   // Second round.
           *   [ [ p2, p3 ], [ p4, p1 ], ... ],
           *
           *   // Further rounds.
           * ];
           * ```
           *
           * @see Matcher.setMatches
           */
          this.matches = null;
  
          /**
           * ### Matcher.resolvedMatches
           *
           * Nested array of matches (with id-strings)
           *
           * Exactly Matcher.matches, but with with ids instead of numbers
           *
           * This method is used both by getMatch and getMatchObject (if
           * a single match is requested).
           *
           * @see Matcher.matches
           * @see Matcher.resolvedMatchesObj
           * @see Matcher.resolvedMatchesById
           * @see Matcher.setIds
           * @see Matcher.setAssignerCb
           * @see Matcher.match
           */
          this.resolvedMatches = null;
  
          /**
           * ### Matcher.resolvedMatchesObj
           *
           * Array of maps id to partner, one map per round
           *
           * ```javascript
           *
           * // Matching array.
           * [
           *
           *   // First round.
           *   { p1: 'p2', p2: 'p1', p3: 'p4', p4: 'p3',  ... },
           *
           *   // Second round.
           *   { p2: 'p3', p3: 'p2', p4: 'p1', p1: 'p4',  ... },
           *
           *   // Further rounds.
           * ];
           * ```
           *
           * @see Matcher.resolvedMatches
           * @see Matcher.resolvedMatchesById
           * @see Matcher.setIds
           * @see Matcher.match
           */
          this.resolvedMatchesObj = null;
  
          /**
           * ### Matcher.resolvedMatchesById
           *
           * Maps ids to a sequence of matches
           *
           * ```javascript
           *
           * // Matching object.
           * {
           *
           *   // All rounds.
           *   p1: [ 'p2', 'p4', ... ],
           *   p2: [ 'p1', 'p3', ... ],
           *   p3: [ 'p4', 'p2', ... ],
           *   p4: [ 'p3', 'p1', ... ]
           *   ...
           *
           * };
           * ```
           *
           * @see Matcher.resolvedMatches
           * @see Matcher.resolvedMatchesObj
           * @see Matcher.setIds
           * @see Matcher.match
           */
          this.resolvedMatchesById = null;
  
          /**
           * ### Matcher.ids
           *
           * Array ids to match
           *
           * @see Matcher.setIds
           */
          this.ids = null;
  
          /**
           * ### Matcher.ids
           *
           * Array mapping each ordinal position to an id
           *
           * @see Matcher.ids
           * @see Matcher.assignerCb
           */
          this.assignedIds = null;
  
          /**
           * ### Matcher.idsMap
           *
           * Map ids to match
           *
           * @see Matcher.setIds
           */
          this.idsMap = null;
  
          /**
           * ### Matcher.assignedIdsMap
           *
           * Map ids to ordinal position in matches
           *
           * @see Matcher.idsMap
           * @see Matcher.assignedIds
           */
          this.assignedIdsMap = null;
  
          /**
           * ### Matcher.assignerCb
           *
           * Callback that assigns ids to positions
           *
           * An assigner callback must take as input an array of ids,
           * reorder them according to some criteria, and return it.
           * The order of the items in the returned array will be used to
           * match the numbers in the `matches` array.
           *
           * @see Matcher.ids
           * @see Matcher.matches
           * @see Matcher.assignedIds
           */
          this.assignerCb = Matcher.randomAssigner;
  
          /**
           * ## Matcher.missingId
           *
           * An id used to replace missing players ids
           */
          this.missingId = Matcher.missingId;
  
          /**
           * ## Matcher.missingId
           *
           * An id used by matching algorithms to complete unfinished matches
           */
          this.bye = Matcher.bye;
  
          /**
           * ## Matcher.doObjLists
           *
           * Flag that obj lists should be created when `match` is invoked
           *
           * @see Matcher.resolvedMatchesObj
           * @see Matcher.matcher
           */
          this.doObjLists = true;
  
          /**
           * ## Matcher.doIdLists
           *
           * Flag that id lists should be created when `match` is invoked
           *
           * @see Matcher.resolvedMatchesById
           * @see Matcher.matcher
           */
          this.doIdLists = true;
  
          /**
           * ## Matcher.doRoles
           *
           * Flag that roles should be assigned when `match` is invoked
           *
           * Requires roles to be set, otherwise an error is thrown
           *
           * @see Matcher.roles
           * @see Matcher.roler
           * @see Matcher.matcher
           */
          this.doRoles = false;
  
          /**
           * ## Matcher.roler
           *
           * Handles assigning roles to matches
           *
           * If null here, is initialized by `init` if doRoles is TRUE.
           *
           * @see Matcher.doRoles
           * @see Matcher.init
           */
          this.roler = options.roler || null;
  
          /**
           * ## Matcher.roles
           *
           * Roles map created if `doRoles` is TRUE
           *
           * @see Matcher.doRoles
           * @see Matcher.roler
           * @see Matcher.matcher
           */
          this.roler = options.roler || null;
  
          // Init.
          this.init(options);
      }