From 39901aa8410680de099e40cfb5577ca3cc4a13a3 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 23 Oct 2015 17:44:46 +0200 Subject: 42 --- interactor/index.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'interactor/index.html') 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;xPlayer "+(player+1)+" won"); + setstatustext("Player "+(player+1)+" won!"); }); -- cgit v1.2.3-70-g09d2