function getMaxDistance(direction) {
      if (maximumsMap[direction]) return maximumsMap[direction].distance;
      return undefined;
    }
gets the maximum distance swiped in the given direction.
@param {string}  direction The direction of the swipe
@return int  The distance of the swipe
@inner