summaryrefslogtreecommitdiff
path: root/scripts/cards/card.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cards/card.js')
-rw-r--r--scripts/cards/card.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/cards/card.js b/scripts/cards/card.js
index 43dc965..47c7f17 100644
--- a/scripts/cards/card.js
+++ b/scripts/cards/card.js
@@ -7,16 +7,12 @@ const CardPos = ["top", "topl", "topr", "mid", "midt", "midb", "bot", "botl", "b
// Every card should have a deck.
// Use deck.appendCard or deck.prependCard to make a card visible
class Card {
- constructor (id, data)
+ constructor (data)
{
this.e = document.createElement("card");
this.generateElements(data);
this.e.style.left = "0px";
this.e.style.top = "0px";
-
- this.getID = function() {
- return id;
- }
}
// Generate a card with basic text only
@@ -117,4 +113,8 @@ class Card {
this.e.style.left = "0px";
this.e.style.top = "0px";
}
+
+ getDeck() {
+ return this.e.parentElement.deck;
+ }
}