From 5207f04d5b775bf4805d83c81aaad1cfcf3fe68a Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Tue, 19 Jul 2022 00:31:02 -0400 Subject: Change how card id's are held, add swapCard --- scripts/cards/deck.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/cards/deck.js') diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js index 0c88821..8d38186 100644 --- a/scripts/cards/deck.js +++ b/scripts/cards/deck.js @@ -144,7 +144,7 @@ class Deck { { for(let i in this.cards) { - if(this.cards[i].getID() == id) + if(this.cards[i].id === id) return this.removeCard(i); } @@ -186,7 +186,7 @@ class Deck { { for(let c of this.cards) { - if(c.getID() === id) + if(c.id === id) return c; } return null; -- cgit v1.2.3