summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.js b/server.js
index 87a3da4..f5170c1 100644
--- a/server.js
+++ b/server.js
@@ -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;