Disable buttons when player turn ended

master
CrystalMoogle 2023-07-16 17:34:38 +01:00
parent de4dda9b25
commit 20f702b537
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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