Disable buttons when player turn ended
parent
de4dda9b25
commit
20f702b537
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue