Optimize game.countGroup.

(cherry picked from commit 0eac481969bcd104bf818e35889ed4fc1a0742f3)
This commit is contained in:
Tipx-L 2023-08-24 06:33:56 -07:00
parent 94a3733d3e
commit 57398a4ea4
1 changed files with 6 additions and 7 deletions

View File

@ -38815,13 +38815,12 @@
} }
return cards; return cards;
}, },
countGroup:function(){ countGroup:()=>{
var list=lib.group.slice(0); const list=lib.group.slice(0);
return game.countPlayer(function(current){ return game.countPlayer(current=>{
if(list.contains(current.group)){ if(!list.includes(current.group)) return false;
list.remove(current.group); list.remove(current.group);
return true; return true;
}
}); });
}, },
players:[], players:[],