function setMaxDistance(direction, distance) {
      if(direction==NONE) return;
      distance = Math.max(distance, getMaxDistance(direction));
      maximumsMap[direction].distance = distance;
    }
Sets the maximum distance swiped in the given direction.
If the new value is lower than the current value, the max value is not changed.
@param {string}  direction The direction of the swipe
@param {int}  distance The distance of the swipe
@inner