Optimize game.countGroup.
(cherry picked from commit 0eac481969bcd104bf818e35889ed4fc1a0742f3)
This commit is contained in:
parent
94a3733d3e
commit
57398a4ea4
13
game/game.js
13
game/game.js
|
@ -38815,13 +38815,12 @@
|
|||
}
|
||||
return cards;
|
||||
},
|
||||
countGroup:function(){
|
||||
var list=lib.group.slice(0);
|
||||
return game.countPlayer(function(current){
|
||||
if(list.contains(current.group)){
|
||||
list.remove(current.group);
|
||||
return true;
|
||||
}
|
||||
countGroup:()=>{
|
||||
const list=lib.group.slice(0);
|
||||
return game.countPlayer(current=>{
|
||||
if(!list.includes(current.group)) return false;
|
||||
list.remove(current.group);
|
||||
return true;
|
||||
});
|
||||
},
|
||||
players:[],
|
||||
|
|
Loading…
Reference in New Issue