iterableGetCards增加arg2为数组的判断
This commit is contained in:
parent
b857c88e1e
commit
c8a2aef6ad
|
@ -3249,6 +3249,7 @@ export class Player extends HTMLDivElement {
|
||||||
filter = card=>(getCardName(card) == arg2);
|
filter = card=>(getCardName(card) == arg2);
|
||||||
}else if(typeof arg2 == 'object'){
|
}else if(typeof arg2 == 'object'){
|
||||||
filter = card=>{
|
filter = card=>{
|
||||||
|
if(Array.isArray(arg2)) return arg2.includes(getCardName(card));
|
||||||
for (let j in arg2) {
|
for (let j in arg2) {
|
||||||
var value;
|
var value;
|
||||||
if (j == 'type' || j == 'subtype' || j == 'color' || j == 'suit' || j == 'number') {
|
if (j == 'type' || j == 'subtype' || j == 'color' || j == 'suit' || j == 'number') {
|
||||||
|
|
Loading…
Reference in New Issue