From dbb6a5b0d110da6b14f243d6543761f5ac67219a Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 17 Sep 2018 16:26:54 +0000 Subject: [PATCH] Fix --- commands/games/blackjack.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/games/blackjack.js b/commands/games/blackjack.js index cbb081fb..cf2a2c24 100644 --- a/commands/games/blackjack.js +++ b/commands/games/blackjack.js @@ -30,13 +30,13 @@ module.exports = class BlackjackCommand extends Command { const dealerInitialTotal = this.calculate(dealerHand); const playerInitialTotal = this.calculate(playerHand); if (dealerInitialTotal === 21 && playerInitialTotal === 21) { - this.decks.remove(msg.channel.id); + this.decks.delete(msg.channel.id); return msg.say('Well, both of you just hit blackjack. Right away. Rigged.'); } else if (dealerInitialTotal === 21) { - this.decks.remove(msg.channel.id); + this.decks.delete(msg.channel.id); return msg.say('Ouch, the dealer hit blackjack right away! Try again!'); } else if (playerInitialTotal === 21) { - this.decks.remove(msg.channel.id); + this.decks.delete(msg.channel.id); return msg.say('Wow, you hit blackjack right away! Lucky you!'); } let noDealerShow = true; @@ -50,7 +50,7 @@ module.exports = class BlackjackCommand extends Command { **Dealer:** ${dealerHandDisplay.join('\n')} - **You:** + **You (${this.calculate(playerHand)}):** ${playerHand.map(card => card.display).join('\n')} _Hit?_ @@ -88,11 +88,11 @@ module.exports = class BlackjackCommand extends Command { } } } - this.decks.remove(msg.channel.id); + this.decks.delete(msg.channel.id); if (win) return msg.say(`${reason}! You won!`); return msg.say(`${reason}! Too bad.`); } catch (err) { - this.decks.remove(msg.channel.id); + this.decks.delete(msg.channel.id); throw err; } }