diff options
-rw-r--r-- | interactor/index.html | 8 |
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>"); } |