docs: function Room(type, config) {
      var res;
  
      if (!(type in roomTypes)) {
          throw new Error('Room: unknown room type: ' + type);
      }
  
      res = verifyInput(config);
      if (res) throw new TypeError(type + 'Room: ' + res);
  
      /**
       * ### Room.roomType
       *
       * Room type flag
       */
      this.roomType = type;
  
      /**
       * ### Room.roomType
       *
       * GameRoom flag
       */
      this.gameRoom = type === 'Game';
  
      /**
       * ### Room.name
       *
       * Name of the room
       */
      this.name = config.name;
  
      /**
       * ### Room.group
       *
       * The group to which the game room belongs
       */
      this.group = config.group;
  
      /**
       * ### Room.channel
       *
       * Reference to the room's ServerChannel
       */
      this.channel = config.channel;
  
      /**
       * ### Room.gameName
       *
       * The name of the game played in this room
       */
      this.gameName = this.channel.gameName;
  
      /**
       * ### Room.game
       *
       * Reference to the game info object contained in servernode
       */
      this.game = this.channel.servernode.getGamesInfo(this.gameName);
  
      if (!this.game) {
          throw new Error(type + 'Room: game not found: ' + this.gameName);
      }
  
      /**
       * ### Room.gameLevel
       *
       * Game paths for the room
       */
      this.gameLevel = config.gameLevel;
  
      if (this.gameLevel && !this.game.levels[this.gameLevel]) {
          throw new Error(type + 'Room: game ' + this.gameName + ' game level ' +
                          'not found: ' + this.gameLevel);
      }
  
     /**
       * ### Room.channelOptions
       *
       * Action control management for player server
       *
       * It can overwrite default player server settings.
       */
      if (J.isEmpty(config.acm)) this.acm = this.channel.playerServer.acm;
      else this.acm = J.merge(this.channel.playerServer.acm, config.acm);
      if (!this.acm.notify) this.acm.notify = {};
  
      /**
       * ### Room.clients
       *
       * PlayerList containing players and admins inside the room
       */
      this.clients = new ngc.PlayerList();
  
      // Adding views to distinguish admins and players.
      // Note: this.node.player will be added to admins.
      this.clients.view('admin', function(p) {
          return p.admin ? p.id : undefined;
      });
      this.clients.view('player', function(p) {
          return !p.admin ? p.id : undefined;
      });
      this.clients.view('playerConnected', function(p) {
          return !p.admin && p.connected ? p.id : undefined;
      });
  
      // Importing initial clients, if any.
      if (config.clients && config.clients.length) {
          this.clients.importDB(config.clients);
      }
  
      /**
       * ### Room.parentRoom
       *
       * Name of the room's parent or null
       */
      this.parentRoom = null;
  
      /**
       * ### Room.logicPath
       *
       * Game logic path for the room
       */
      this.logicPath = config.logicPath || null;
  
      /**
       * ### Room.runtimeConf
       *
       * Extra configuration that can be accessed by the logic.
       */
      this.runtimeConf = config.runtimeConf || {};
  
      /**
       * ### Room.settings
       *
       * Settings for the actual game room (node instance)
       */
      this.settings = config.settings || {};
  
      /**
       * ### Room.node
       *
       * node instance
       */
      this.node = config.node === null ? null : config.node || ngc.getClient();
  
      /**
       * ### Room.id
       *
       * Random global unique room identifier.
       *
       * @see ServerNode.rooms
       */
      this.id = null;
  
      // Code for Logging Client Events
      /////////////////////////////////
  
      // TODO: Should it be in an own object?
  
      /**
       * ### Room.timeoutSave
       *
       * Contains a reference to timeout object saving the cache
       */
      this.timeoutSave = null;
  
      /**
       * ### Room.cacheToSave
       *
       * A string waiting to be flushed to fs
       *
       * @see ServerNode.timeoutSave
       * @see ServerNode.cacheDumpInterval
       */
      this.cacheToSave = '';
  
      /**
       * ### Room.cacheDumpInterval
       *
       * Saves the cache every X milliseconds
       */
      this.cacheDumpInterval = config.logClientsInterval || 1000;
  
      /**
       * ### Room.logClients
       *
       * If TRUE, clients events will be logged
       */
      this.logClients = config.logClients || false;
  
      /**
       * ### Room.logClientsExtra
       *
       * A function adding extra properties info the clients log.
       */
      this.logClientsExtra = config.logClientsExtra || null;
  
      /**
       * ### Room.logFilePath
       *
       * Path to the log file where the cache is dumped.
       */
      this.logFilePath = (function(that) {
          var str;
          str = new Date().toISOString();
          str = str.substring(0, str.length - 5);
          return path.join(that.channel.getGameDir(),
                           'log', (that.name + '_' + str + '.csv'));
      })(this);
  
      ///////////////////////////////////////////////////////////////
  }