summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/server.js b/server.js
index bb21514..87a3da4 100644
--- a/server.js
+++ b/server.js
@@ -70,9 +70,9 @@ var State = {
WINNING: 3,
};
var Delay = {
- DRAWING: 60,
- VOTING: 30,
- WINNING: 30,
+ DRAWING: 60 * 1000,
+ VOTING: 30 * 1000,
+ WINNING: 30 * 1000,
}
function Channel() {
this.state = State.WAITING;
@@ -136,7 +136,7 @@ Channel.prototype.checkState = function(){
Channel.prototype.hasEnoughPlayers = function(){
var count = 0;
for (var i in this.players) {
- if (++count > 2) return true;
+ if (++count > 1) return true;
}
return false;
}
@@ -144,7 +144,7 @@ Channel.prototype.hasEnoughPlayers = function(){
Channel.prototype.pushImage = function(image){
this.imageCount++;
this.images[ image.nick ] = image;
- io.sockets.emit( 'event-image', imageData );
+ io.sockets.emit( 'event-image', image );
if (this.imageCount == this.playerCount) this.startVoting();
}