summaryrefslogtreecommitdiff
path: root/scripts/cards/card.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-07-17 20:17:28 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-07-17 20:17:28 -0400
commitc9edb73751d20bb3c09b406895ca6982b455c9e4 (patch)
treec6cca364d2612db9bda4776ea19d8856fa29c92d /scripts/cards/card.js
parent0e010b53fbaa243760f5aabd8ad5ed85c87243fd (diff)
Some fixes
Diffstat (limited to 'scripts/cards/card.js')
-rw-r--r--scripts/cards/card.js6
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