1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-12-23 21:03:14 +00:00
This commit is contained in:
exane 2015-06-27 15:37:36 +02:00
parent d469585b89
commit 215b30ee42
3 changed files with 2 additions and 36 deletions

View File

@ -126,7 +126,7 @@ $game-height: 800px;
i {
display: block;
transform: scale(1);
//transform: scale(1);
}
/*.card-attr-power {

View File

@ -33,14 +33,6 @@ var User = (function(){
return this._id;
}
/*r.joinRoom = function(roomid){
var self = this;
*//*this.socket.on(roomid, function(d) {
var event = d.event, data = d.data;
self.socket.on(event, data);
});*//*
}*/
r.send = function(event, data, room){
room = room || null;
data = data || null;
@ -49,10 +41,6 @@ var User = (function(){
}
else {
this.socket.to(room).emit(event, data);
/*this.socket.global.publish(room, {
event: event,
data: data
})*/
}
}
@ -128,28 +116,6 @@ var User = (function(){
socket.emit("response:name", {name: self.getName()});
})
/*socket.on("request:createRoom", function(){
var room = Room();
connections.roomCollection[room.getID()] = room;
room.join(self);
console.log("room %s created by %s", room.getID(), self.getName());
self.send("response:createRoom", room.getID());
})
socket.on("request:joinRoom", function(){
console.log("joinroom");
var interval = setInterval(function(){
for(var key in connections.roomCollection) {
var room = connections.roomCollection[key];
if(!room.isOpen()) continue;
room.join(self);
clearInterval(interval);
console.log("user %s joined room %s", self.getName(), room.getID());
self.send("response:joinRoom", room.getID());
}
}, 1000);
})*/
socket.on("request:matchmaking", function() {
if(self._inQueue) return;
matchmaking.findOpponent(self);

View File

@ -29,7 +29,7 @@ global.io = require("socket.io")(app);
app.listen(16918);
io.on("connection", function(socket) {
io.on("connection", function(socket) { //global connection
var user;
connections.add(user = User(socket));
console.log("new user ", user.getName());