From c99da669c783c1fc172d6ce9709306e2b2293fdd Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 23 Oct 2015 14:42:44 +0200 Subject: 1 --- interactor/index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interactor/index.html b/interactor/index.html index 21892c7..9b96a05 100644 --- a/interactor/index.html +++ b/interactor/index.html @@ -156,6 +156,10 @@ function applymove(idx,c){ drawboard(bd,onturn); if(finalstage){ applymove_busy=false; + while(applymove_queue.length&&typeof applymove_queue[0]=="function"){ + applymove_queue[0](); + applymove_queue.shift(); + } if(applymove_queue.length){ setTimeout(function(){ applymove(applymove_queue[0][0],applymove_queue[0][1]); @@ -176,6 +180,10 @@ function queueapplymove(idx,c){ } function getusermove(){ + if(applymove_busy)applemove_queue.push(_getusermove); + else _getusermove(); +} +function _getusermove(){ usercanmove=true; setstatustext("Your turn!"); } -- cgit v1.2.3-54-g00ecf