diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-03-04 18:03:56 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-03-04 18:03:56 -0500 |
| commit | d7d98db072fee588a095224c5210def75213dec5 (patch) | |
| tree | 5583382da5f6b6edebcbe77a26fa8f79f2522a7d | |
| parent | 3c88fe5742f6e017a7e32a348f69b582a6709927 (diff) | |
slight delay on join/part so we don't clobber game state
| -rw-r--r-- | public/css/drawdrawdraw.css | 17 | ||||
| -rw-r--r-- | server.js | 4 |
2 files changed, 18 insertions, 3 deletions
diff --git a/public/css/drawdrawdraw.css b/public/css/drawdrawdraw.css index 6d2ed12..0a33b61 100644 --- a/public/css/drawdrawdraw.css +++ b/public/css/drawdrawdraw.css @@ -55,4 +55,19 @@ body { } #image { display: none; -}
\ No newline at end of file +} + +#voting { + position: absolute; + left: 400px; + top: 50px; +} +#voting li { + list-style-type: none; +} + +#winning { + position: absolute; + left: 400px; + top: 50px; +} @@ -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; |
