From 12b6bb7358b872e924154d0b6f309fd8f9368c64 Mon Sep 17 00:00:00 2001 From: CrystalMoogle Date: Sun, 16 Jul 2023 16:14:04 +0100 Subject: [PATCH] Move this here, otherwise dealer can win with 5 cards even if bust --- BlackjackGUI/game.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BlackjackGUI/game.vb b/BlackjackGUI/game.vb index a12951b..f159a11 100644 --- a/BlackjackGUI/game.vb +++ b/BlackjackGUI/game.vb @@ -108,14 +108,14 @@ CheckGame() Exit Sub End If - If dealer.ingame And dealer.hand.Count < 5 Then + If dealer.ingame Then If dealer.total = 21 And dealer.hand.Count = 2 Then dealer.winType = WinCondition.Blackjack dealer.ingame = False ElseIf dealer.total > 21 Then dealer.winType = WinCondition.Bust player.ingame = False - ElseIf dealer.total < dealer.limit Then + ElseIf dealer.total < dealer.limit And dealer.hand.Count < 5 Then DealCard(dealer) DealerTurn() Else