diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-03-04 17:45:05 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-03-04 17:45:05 -0500 |
| commit | 38879acc99cdd14d6dc4da3cefcf64373a2b1402 (patch) | |
| tree | 9421689ba398cd8dbeba063699fc7a3bb49ff0c7 /server.js | |
| parent | bd0d666340c3660d17b538cc8fda88ce3d9f81ff (diff) | |
looping through states..!
Diffstat (limited to 'server.js')
| -rw-r--r-- | server.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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(); } |
