index.js
function( userId ) {

		return this.memory.createRoom( userId )
			   .then( function( id ) {

			   		rooms[ id ] = room( this.memory, id );
			   			
						return promise.resolve( rooms[ id ] );
			   }.bind( this ), function() {

			   		return promise.reject( 'could not get a roomID to create a room' );
			   });
	}
function( userId ) {

		return this.memory.createRoom( userId )
			   .then( function( id ) {

			   		rooms[ id ] = room( this.memory, id );
			   			
						return promise.resolve( rooms[ id ] );
			   }.bind( this ), function() {

			   		return promise.reject( 'could not get a roomID to create a room' );
			   });
	}
function ( userId ) { return this . memory . createRoom ( userId ) . then ( function ( id ) { rooms [ id ] = room ( this . memory , id ) ; return promise . resolve ( rooms [ id ] ) ; } . bind ( this ) , function ( ) { return promise . reject ( 'could not get a roomID to create a room' ) ; } ) ; }
Create a new room object

@param  {String} userId id of the user whose reserving a room
@param  {Boolean} isPublic whether the room your are creating is publicly available
@return {Promise} This promise will resolve by sending a room instance
Create a new room object