Hey there, just asking how I could implement a scoring system to add up the totals of the player and dealer to see who has the highest number for a game of blackjack. Currently not started on the computer controlled dealer but just wondering how I woul add the total value of the cards together while using cards.dll
VB Code:
Private Sub Form_Load() Randomize End Sub Private Sub CMD_Deal_Click() cdtDraw Me.hdc, 370, 75, Int((51 - 0 + 1) * Rnd + 0), 0, vbWhite cdtDraw Me.hdc, 300, 75, Int((51 - 0 + 1) * Rnd + 0), 0, vbWhite cdtDraw Me.hdc, 370, 300, Int((51 - 0 + 1) * Rnd + 0), 0, vbWhite cdtDraw Me.hdc, 300, 300, Int((51 - 0 + 1) * Rnd + 0), 0, vbWhite End Sub Private Sub CMD_Hit_Click() Static Xpos As Long If Xpos = 0 Then Xpos = 300 Else: Xpos = Xpos + 25 End If cdtDraw Me.hdc, Xpos, 300, Int((51 - 0 + 1) * Rnd + 0), 0, vbWhite End Sub Private Sub CMD_Main_Menu_Click() MainMenu.Show Unload Me End Sub
IT got me stumped and also to recalculate the total after each time the hit command is pressed
Any help is appreciated




Reply With Quote