diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-10-23 17:44:46 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-10-23 17:44:46 +0200 |
commit | 39901aa8410680de099e40cfb5577ca3cc4a13a3 (patch) | |
tree | 40e696f5a928f9a5f68c9abe8aedf516da011b1b /interactor/index.html | |
parent | aa3ec5e60581f65ff0106b7fbe58549ba1b568d3 (diff) |
42
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> |