summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-10-23 14:42:44 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-10-23 14:42:44 +0200
commitc99da669c783c1fc172d6ce9709306e2b2293fdd (patch)
tree527ded308b2574bcfc1908ac04238a54d411685b
parent71bfef83636c60ef0f24a9583165c2d46fefe919 (diff)
1
-rw-r--r--interactor/index.html8
1 files changed, 8 insertions, 0 deletions
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("<b>Your turn!</b>");
}