From 4b408bf19a1ad8ab73626c333245157e71158b2e Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 17 Jul 2022 20:40:58 -0400 Subject: Fix table getting cards --- scripts/cards/deck.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/cards') diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js index 941df8c..0c88821 100644 --- a/scripts/cards/deck.js +++ b/scripts/cards/deck.js @@ -70,17 +70,25 @@ class Deck { appendCard(card) { + if(this.inf) { + return false; + } this.cards.push(card); this.e.appendChild(card.e); this.updatePos(); + return true; } prependCard(card) { + if(this.inf) { + return false; + } this.cards.unshift(card); this.e.prepend(card.e); card.setPos(this.cards.length - 1); this.updateCount(); + return true; } addCardAt(card, index) -- cgit v1.2.3