summaryrefslogtreecommitdiff
path: root/scripts/cards
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cards')
-rw-r--r--scripts/cards/card.js4
-rw-r--r--scripts/cards/deck.js4
2 files changed, 3 insertions, 5 deletions
diff --git a/scripts/cards/card.js b/scripts/cards/card.js
index 3ca435c..7246db3 100644
--- a/scripts/cards/card.js
+++ b/scripts/cards/card.js
@@ -15,9 +15,7 @@ class Card {
this.e.style.top = "0px";
this.e.card = this;
- this.getID = function() {
- return id;
- }
+ this.id = id;
}
// Generate a card with basic text only
diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js
index 0c88821..8d38186 100644
--- a/scripts/cards/deck.js
+++ b/scripts/cards/deck.js
@@ -144,7 +144,7 @@ class Deck {
{
for(let i in this.cards)
{
- if(this.cards[i].getID() == id)
+ if(this.cards[i].id === id)
return this.removeCard(i);
}
@@ -186,7 +186,7 @@ class Deck {
{
for(let c of this.cards)
{
- if(c.getID() === id)
+ if(c.id === id)
return c;
}
return null;