consts
parent
fd76c5ebe4
commit
5c428750bb
6
tarot.js
6
tarot.js
|
@ -40,7 +40,7 @@ class Tarot {
|
||||||
}
|
}
|
||||||
|
|
||||||
drawCard() {
|
drawCard() {
|
||||||
let cardName = this.deck.random();
|
const cardName = this.deck.random();
|
||||||
if (cardName === null) {
|
if (cardName === null) {
|
||||||
this.render();
|
this.render();
|
||||||
return;
|
return;
|
||||||
|
@ -89,8 +89,8 @@ class Tarot {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let bp = document.querySelector(".card.blueprint");
|
const bp = document.querySelector(".card.blueprint");
|
||||||
let cardElem = bp.cloneNode(true);
|
const cardElem = bp.cloneNode(true);
|
||||||
cardElem.classList.remove("blueprint");
|
cardElem.classList.remove("blueprint");
|
||||||
cardElem.setAttribute("data-cardName", cardName)
|
cardElem.setAttribute("data-cardName", cardName)
|
||||||
cardElem.setAttribute("style", "float:left; width: 150px; height: 250px; border: 1px solid pink;");
|
cardElem.setAttribute("style", "float:left; width: 150px; height: 250px; border: 1px solid pink;");
|
||||||
|
|
Loading…
Reference in New Issue