diff --git a/googletrendsgame/server/index.html b/googletrendsgame/server/index.html index 25ce7e4..ae024c1 100644 --- a/googletrendsgame/server/index.html +++ b/googletrendsgame/server/index.html @@ -23,7 +23,13 @@ var tt = new Object(); tt.roomName = "den"; tt.password = "pp"; - socket.emit('joinRoom', tt); + socket.emit('createRoom', tt); + }); + + socket.on('roomUpdate', function(data) + { + console.log("good"); + console.log(data); }); diff --git a/googletrendsgame/server/server.js b/googletrendsgame/server/server.js index f616c39..4990547 100644 --- a/googletrendsgame/server/server.js +++ b/googletrendsgame/server/server.js @@ -181,6 +181,7 @@ var room = function(capacityP, pass, owner) //if room is empty remove the room from rooms list if(this.users.length == 0) { + console.log("room scrubbed"); delete rooms[this.roomName]; }