Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

Redirected. Blackjack- Creating cards

$
0
0
Hey guys, im having some problems with adding cards to my Blackjack program and after posting this in visualbasic.net section i was adviced to bring my problem here for help.

At the moment I have labels that act in the place of cards, randomly generating a number and assigning it to the label, but now I want to use pictures and assign the picture a value.

This is the code so far for the card labels:

--------------
Function AddCard()

Dim Value As Integer


Randomize()
Value = (10 * Rnd() + 1)


Return Value



End Function

PlayerCard1.Text = AddCard()
PlayerCard2.Text = AddCard()
PlayerTotal = Val(PlayerCard1.Text) + Val(PlayerCard2.Text)
LblPlayerTotal.Text = PlayerTotal

--------------

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>