diff --git a/BlackjackGUI/GameWindow.vb b/BlackjackGUI/GameWindow.vb index fcb6c18..84ccc66 100644 --- a/BlackjackGUI/GameWindow.vb +++ b/BlackjackGUI/GameWindow.vb @@ -54,6 +54,11 @@ PlayerCard7.Image = Utilities.GetCardImage(card) End Sub + Private Sub EndPlayerTurn() Handles game.EndPlayerTurn + HitButton.Enabled = False + StandButton.Enabled = False + End Sub + Private Sub EndGame(message) Handles game.EndGame WinMessage.Text = message HitButton.Enabled = False diff --git a/BlackjackGUI/game.vb b/BlackjackGUI/game.vb index 5a05472..4f6f4e3 100644 --- a/BlackjackGUI/game.vb +++ b/BlackjackGUI/game.vb @@ -3,6 +3,7 @@ Public Event CardDealt(card, cardNumber, hide) Public Event SetTotalLabels(playerTotal, dealerTotal) Public Event ShowDealerCard(card) + Public Event EndPlayerTurn() Public Event EndGame(winMessage) Private player As Player @@ -107,6 +108,7 @@ Sub DealerTurn() GetTotal(dealer) + RaiseEvent EndPlayerTurn() RaiseEvent SetTotalLabels(player.total, dealer.total) RaiseEvent ShowDealerCard(dealer.hidden) If player.winType = WinCondition.Bust Then