diff options
Diffstat (limited to 'scripts/cards/card.js')
-rw-r--r-- | scripts/cards/card.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/cards/card.js b/scripts/cards/card.js index 9223f14..3ca435c 100644 --- a/scripts/cards/card.js +++ b/scripts/cards/card.js @@ -7,13 +7,17 @@ const CardPos = ["top", "topl", "topr", "mid", "midt", "midb", "bot", "botl", "b // Every card should have a deck. // Use deck.appendCard, deck.prependCard, or deck.addCardAt to make a card visible class Card { - constructor (data) + constructor (id, data) { this.e = document.createElement("card"); this.generateElements(data); this.e.style.left = "0px"; this.e.style.top = "0px"; this.e.card = this; + + this.getID = function() { + return id; + } } // Generate a card with basic text only |