From 324bb279a74ab7d74849a4a55e44fba652a190aa Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 23 Oct 2015 14:20:28 +0200 Subject: Client improvements --- interactor/index.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'interactor/index.html') diff --git a/interactor/index.html b/interactor/index.html index c861c82..21892c7 100644 --- a/interactor/index.html +++ b/interactor/index.html @@ -112,6 +112,7 @@ function stabiliseanims(bd){ } bd=newbd; anims.push([stage,bdcopy(bd)]); + if(checkwin(bd)!=-1)break; } while(stage.length); return anims; } @@ -203,6 +204,9 @@ socket.on("setonturn",function(player){ socket.on("getusermove",function(){ getusermove(); }); +socket.on("win",function(player){ + setstatustext("Player "+(player+1)+" won"); +}); -- cgit v1.2.3-70-g09d2