diff options
Diffstat (limited to 'server.js')
| -rw-r--r-- | server.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -129,9 +129,9 @@ Channel.prototype.setTimeout = function( callback, delay ){ // Someone joined/left, so either start a game or stop it. Channel.prototype.checkState = function(){ if ( this.hasEnoughPlayers() ) { - if (this.state <= State.WAITING) this.startDrawing(); + if (this.state <= State.WAITING) this.setTimeout( this.startDrawing, 2000); } - else if (this.state > State.WAITING) this.startWaiting(); + else if (this.state > State.WAITING) this.setTimeout( this.startWaiting, 2000); } Channel.prototype.hasEnoughPlayers = function(){ var count = 0; |
