docs: function WaitingRoom(config) {
      // Supercall
      HostRoom.call(this, 'Waiting', config);
      if (!this.logicPath) this.logicPath = ngt.resolve('waitroom/waitroom.js');
  
      /**
       * ### WaitingRoom.roomOpen
       *
       * Flag indicating whether the room is open
       */
      this.roomOpen = config.roomOpen || true;
  
      /**
       * ### WaitingRoom.dispatching
       *
       * Numeric flag indicating whether the room is dispatching a new game
       *
       *
       */
      this.dispatching = 0;
  
      /**
       * ### WaitingRoom.timeOuts
       *
       * Array of setTimeout return values indexed by playerIDs
       */
      this.timeOuts = {};
  
      /**
       * ### WaitingRoom.notifyTimeout
       *
       * A timeout to notify players about updates in the number of players
       *
       * @see WaitingRoom.notifyPlayers
       */
      this.notifyTimeout = null;
  
      /**
       * ### WaitingRoom.numberOfDispatches
       *
       * Non-negative integer indicating the number of game dispatches
       */
      this.numberOfDispatches = config.numberOfDispatches || 0;
  
      /**
       * ### WaitingRoom.lastGameRoom
       *
       * Reference to the last created game room
       */
      this.lastGameRoom = null;
  
      /**
       * ### WaitingRoom.GROUP_SIZE
       *
       * Positive non-zero integer indicating the size of each group
       */
      this.GROUP_SIZE = null;
  
      /**
       * ### WaitingRoom.POOL_SIZE
       *
       * Positive non-zero integer indicating number of clients for group forming
       */
      this.POOL_SIZE = null;
  
      /**
       * ### WaitingRoom.DISCONNECT_IF_NOT_SELECTED
       *
       * Boolean or null, indicating whether unselected players are disconnected
       */
      this.DISCONNECT_IF_NOT_SELECTED = null;
  
      /**
       * ### WaitingRoom.timeOuts
       *
       * Array of setTimeout return values indexed by playerIDs
       */
      this.N_GAMES = null;
  
      /**
       * ### WaitingRoom.START_DATE
       *
       * Time and date of game start
       *
       * Must be valid input for `Date` constructor
       */
      this.START_DATE = null;
  
      /**
       * ### WaitingRoom.EXECUTION_MODE
       *
       * String indicating execution mode
       *
       * In the execution mode `'TIMEOUT`, one waits until the time is up, then
       * it will be checked whether enough players are there to start the game.
       * In the execution mode `WAIT_FOR_N_PLAYERS`, the game starts right away
       * if there are the desired number of players. Otherwise, when the time is
       * up, it will be checked if there are at least a certain minimum number of
       * players to start the game. If the execution mode is `WAIT_FOR_DISPATCH`,
       * it simply waits for a dispatch command from monitor, the number of
       * connected players is not taken into account.
       */
      this.EXECUTION_MODE = null;
  
      /**
       * ### WaitingRoom.MAX_WAIT_TIME
       *
       * Positive non-zero integer indicating max number of milliseconds to start
       *
       * Cannot be defined at the same time as `WaitingRoom.START_DATE`
       */
      this.MAX_WAIT_TIME = null;
  
      /**
       * ### WaitingRoom.ON_TIMEOUT
       *
       * Callback to be executed client-side after waiting time has elapsed
       */
      this.ON_TIMEOUT = null;
  
      /**
       * ### WaitingRoom.ON_TIMEOUT_SERVER
       *
       * Callback to be executed after a timeout has expired
       */
      this.ON_TIMEOUT_SERVER = null;
  
      /**
       * ### WaitingRoom.ON_OPEN
       *
       * Callback to be executed when the waiting room becomes open
       */
      this.ON_OPEN = null;
  
      /**
       * ### WaitingRoom.ON_CLOSE
       *
       * Callback to be executed when the waiting room becomes close
       */
      this.ON_CLOSE = null;
  
      /**
       * ### WaitingRoom.ON_CONNECT
       *
       * Callback to be executed when a player connects
       */
      this.ON_CONNECT = null;
  
      /**
       * ### WaitingRoom.ON_DISCONNECT
       *
       * Callback to be executed when a player disconnects
       */
      this.ON_DISCONNECT = null;
  
      /**
       * ### WaitingRoom.ON_INIT
       *
       * Callback to be executed after the settings have been parsed
       */
      this.ON_INIT = null;
  
      /**
       * ### WaitingRoom.ON_DISPATCH
       *
       * Callback to be executed just before starting dispatching
       *
       * Receives the options of the dispatch call as second param
       */
      this.ON_DISPATCH = null;
  
      /**
       * ### WaitingRoom.ON_DISPATCHED
       *
       * Callback to be executed at the end of a dispatch call
       */
      this.ON_DISPATCHED = null;
  
      /**
       * ### WaitingRoom.ON_FAILED_DISPATCH
       *
       * Callback to be executed if a dispatch attempt failed
       */
      this.ON_FAILED_DISPATCH = null;
  
      /**
       * ### WaitingRoom.CHOSEN_TREATMENT
       *
       * String or undefined indicating chosen treatment
       */
      this.CHOSEN_TREATMENT = null;
  
      /**
       * ### WaitingRoom.OVERWRITE_CHOSEN_TREATMENT
       *
       * If set, it overwrites chosen treatment for the next dispatch only
       *
       * When dispatch is invoked remotely, users may specify a treatment.
       *
       * It is set to null at every dispatch.
       *
       * @see WaitingRoom.ALLOW_SELECT_TREATMENT
       */
      this.OVERWRITE_CHOSEN_TREATMENT = null;
  
      /**
       * ### WaitingRoom.PLAYER_SORTING
       *
       * Callback to sort the list of players before dispatching
       *
       * If NULL, random sorting takes place. Default: 'timesNotSelected'
       */
      this.PLAYER_SORTING = WaitingRoom.sortingCallbacks.timesNotSelected;
  
      /**
       * ### WaitingRoom.PING_BEFORE_DISPATCH
       *
       * If TRUE, all players are pinged before a dispatch (Default: TRUE)
       *
       * Non-responding clients are disconnected.
       *
       * If only one player is needed and mode is 'WAIT_FOR_N_PLAYERS',
       * pinging is skipped.
       *
       * @see PING_MAX_REPLY_TIME
       */
      this.PING_BEFORE_DISPATCH = true;
  
      /**
       * ### WaitingRoom.PING_MAX_REPLY_TIME
       *
       * The time to wait to receive a ping back
       *
       * Clients will be disconnected if they do not reply in time.
       *
       * @see PING_BEFORE_DISPATCH
       */
      this.PING_MAX_REPLY_TIME = 3000;
  
      /**
       * ### WaitingRoom.PING_DISPATCH_ANYWAY
       *
       * If TRUE, dispatch continues even if disconnections occur during PING
       *
       * @see PING_BEFORE_DISPATCH
       * @see PING_MAX_REPLY_TIME
       */
      this.PING_DISPATCH_ANYWAY = false;
  
      /**
       * ### WaitingRoom.TEXTS
       *
       * List of texts replacing default ones in WaitingRoom widget
       *
       * @see WaitingRoom.texts (widget)
       */
      this.TEXTS = {};
  
      /**
       * ### WaitingRoom.SOUNDS
       *
       * List of paths to sounds replacing default ones in WaitingRoom widget
       *
       * @see WaitingRoom.sounds (widget)
       */
      this.SOUNDS = {};
  
      /**
       * ### WaitingRoom.PAGE_TITLE
       *
       * Sets the page title, optionally adds to page
       *
       */
      this.PAGE_TITLE =  { title: 'Welcome!', addToBody: true };
  
      /**
       * ### WaitingRoom.isPingInProgress
       *
       * Flag to indicate whether currently pinging for unresponsive players
       */
      this.isPingInProgress = false;
  
      /**
       * ### WaitingRoom.suspendedPings
       *
       * Flag to indicate whether currently pinging for unresponsive players
       */
      this.suspendedPings = [];
  
      /**
       * ### WaitingRoom.closeAfterDispatch
       *
       * Flag that the waiting room will close after next dispatch
       *
       * Note: waiting room can dispatch multiple groups, and then will close.
       */
      this.closeAfterDispatch = false;
  
      /**
       * ### WaitingRoom.makeClientTimeouts
       *
       * TRUE, if it makes timeouts for connecting clients
       *
       * Makes timeout if START_DATE or MAX_WAIT_TIME is set.
       *
       * @see WaitingRoom.makeTimeOut
       * @see WaitingRoom.clearTimeOut
       * @see WaitingRoom.START_DATE
       * @see WaitingRoom.MAX_WAIT_TIME
       */
      this.makeClientTimeOuts = false;
  
      /**
       * ### WaitingRoom.NOTIFY_INTERVAL
       *
       * The number of milliseconds to wait before sending a player-update message
       *
       * @see WaitingRoom.notifyPlayerUpdate
       */
      this.NOTIFY_INTERVAL = 200;
  
      /**
       * ### WaitingRoom.availableTreatments
       *
       * List of available treatments including treatment callbacks
       *
       * Maps names to descriptions.
       */
      this.availableTreatments = (function(that) {
          var o, t, key;
          if (that.gameLevel) {
              // Treatments are not yet parsed.
              t = that.game.levels[that.gameLevel].settings.treatments;
          }
          else {
              // Treatments are already parsed at this point.
              t = that.game.settings;
          }
          // Hard-cloned, check names in treatmentCallbacks.
          o = {
              treatment_random:
              WaitingRoom.treatmentCallbacks['treatment_random'],
              treatment_rotate:
              WaitingRoom.treatmentCallbacks['treatment_rotate']
          };
          for (key in t) {
              if (t.hasOwnProperty(key)) {
                  o[key] = t[key].description || 'no description';
              }
          }
          return o;
      })(this);
  }