This commit is contained in:
Dragon Fire
2021-04-11 14:28:52 -04:00
parent 3cf5479143
commit ea4c26ffef
+3 -3
View File
@@ -18,13 +18,13 @@ module.exports = class TarotDeck {
}
draw(amount = 1) {
const cards = [];
const drawn = [];
for (let i = 0; i < amount; i++) {
const card = this.deck[0];
this.deck.shift();
cards.push(card);
drawn.push(card);
}
return amount === 1 ? cards[0] : cards;
return amount === 1 ? drawn[0] : drawn;
}
reset() {