diff options
Diffstat (limited to 'interactor/index.html')
-rw-r--r-- | interactor/index.html | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/interactor/index.html b/interactor/index.html index ff2edf4..19dc703 100644 --- a/interactor/index.html +++ b/interactor/index.html @@ -11,6 +11,9 @@ var CVSH=500; var COLOURS=["#00F","#F00","#0CC"]; var socket=io(); +setInterval(function(){ + socket.emit("ping"); +},1000); var CELLSZ=~~(CVSH/(H+1)); var CVSW=CELLSZ*(W+1); var CELL0X=~~(CVSW/2-W/2*CELLSZ)+.5,CELL0Y=~~(CVSH/2-H/2*CELLSZ)+.5; @@ -65,7 +68,7 @@ function drawboard(bd,clr){ for(x=0;x<W;x++){ ctx.fillStyle=COLOURS[bd[y][x].c]; angle=1/bd[y][x].n*2*Math.PI; - radius=bd[y][x].n==1?0:.12; + radius=bd[y][x].n==1?0:.15; for(i=0;i<bd[y][x].n;i++){ ctx.beginPath(); ctx.arc( @@ -169,8 +172,8 @@ function applymove(idx,c){ } } time++; - },30); - },500*i+1); + },20); + },350*i+1); }); } @@ -216,7 +219,7 @@ socket.on("getusermove",function(){ else getusermove(); }); socket.on("win",function(player){ - setstatustext("<b>Player "+(player+1)+" won</b>"); + setstatustext("<b><i>Player "+(player+1)+" won!</i></b>"); }); </script> </head> |