Add methods for cards.

This commit is contained in:
Tipx-L 2023-10-17 08:43:47 -07:00
parent 55f1dbf273
commit 409cba569f
1 changed files with 22 additions and 1 deletions

View File

@ -30449,6 +30449,24 @@
if(!this.hasOwnProperty('storage')) this.storage={};
if(!this.hasOwnProperty('cards')) this.cards=[];
}
sameSuitAs(card){
return get.suit(this)==get.suit(card);
}
differentSuitFrom(card){
return get.suit(this)!=get.suit(card);
}
sameNumberAs(card){
return get.number(this)==get.number(card);
}
differentNumberFrom(card){
return get.number(this)!=get.number(card);
}
sameNameAs(card){
return get.name(this)==get.name(card);
}
differentNameFrom(card){
return get.name(this)!=get.name(card);
}
/**
* @param {Player} player
*/
@ -61786,7 +61804,10 @@
return object;
};
setAllPropertiesEnumerable(lib.element.Player.prototype);
setAllPropertiesEnumerable(lib.element.Card.prototype);
const cardPrototype=setAllPropertiesEnumerable(lib.element.Card.prototype),vCardPrototype=setAllPropertiesEnumerable(lib.element.VCard.prototype);
Object.keys(vCardPrototype).forEach(key=>{
Object.defineProperty(cardPrototype,key,Object.getOwnPropertyDescriptor(vCardPrototype,key));
});
setAllPropertiesEnumerable(lib.element.Button.prototype);
setAllPropertiesEnumerable(lib.element.Event.prototype);
setAllPropertiesEnumerable(lib.element.Dialog.prototype);