Optimize game.updateRoundNumber.

(cherry picked from commit f6ef195a2f901bb8311598a5887ec6f6d36479b3)
This commit is contained in:
Tipx-L 2023-08-24 21:12:08 -07:00
parent 44d95a70b7
commit fc0f70bc7e
1 changed files with 4 additions and 6 deletions

View File

@ -37425,12 +37425,10 @@
} }
}); });
}, },
updateRoundNumber:function(){ updateRoundNumber:()=>game.broadcastAll((num1,num2,top)=>{
game.broadcastAll(function(num1,num2,top){ if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=`${num1}轮 剩余牌: ${num2}`;
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=num1+'轮 剩余牌: '+num2;
_status.pileTop=top; _status.pileTop=top;
},game.roundNumber,ui.cardPile.childNodes.length,ui.cardPile.firstChild); },game.roundNumber,ui.cardPile.childNodes.length,ui.cardPile.firstChild),
},
asyncDraw:(players,num,drawDeck,bottom)=>players.forEach((value,index)=>{ asyncDraw:(players,num,drawDeck,bottom)=>players.forEach((value,index)=>{
let num2=1; let num2=1;
if(typeof num=='number') num2=num; if(typeof num=='number') num2=num;