So im working currently on a blackjack application.
My application have 5 buttons:
Start
Hit me (Give new card to player)
Stand (Stop giving new cards and let computer play)
Reset
Exit
Now the I have a problem with the first 2 buttons:
I want the start button to be clicked only once (otherwise you can click as many times as you want to get good cards) how do you set a click limit on the button.
The next problem with the HitMe button:
Im using pictureboxes for the cards which got different names of course.
So the first time you click the picturebox name must be Player_Card3 second time Player_Card4 and so on...
Here a little part of my code you might need to help me :rolleyes:
Random start = new Random(); //RANDOM NUMBER
Bitmap myStartCard;
private void Hit_btn_Click(object sender, EventArgs e)
{//START HITMEBUTTON
int x = start.Next(0, 13);
if (x == 0)
{
myStartCard = new Bitmap(ace);
}
[U][B]Player_Card1.Image = myStartCard;[/B][/U]
}//END HITMEBUTTON
So as you can see the bold underlined line needs to change its digit every time you click the hitme button


Sign In
Create Account


Back to top










