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;
|
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:[],
|
||||||
|
|
Loading…
Reference in New Issue