Card Game – Where the aim is to get your cards closer to 21 than the dealer, while not going over. J, Q, K are worth 10. A are either 11 or 1.
Questions tagged [blackjack]
394 questions
-4
votes
1 answer
Blackjack game - Difficulty with Java - superclasses
I'm creating a Blackjack program and I'm stuck, I would appreciate any help available.
I have a Player class and a Card class.
The below function (getHandValue) is meant to calculate the total value of the player's hand.
/*getHandValue - accessor…
![](../../users/profiles/15293496.webp)
bi8921
- 1
-4
votes
2 answers
how do I use else and if statements
both of my options are coming up when I run the code
I have tried two if statements else if and else
cout << "would you like to hit or stand?" << endl; //asking if you would ike to hit or stand
bool hit; //the hjitting opption
bool stand; // the…
![](../../users/profiles/10333406.webp)
Chris.B
- 7
- 1
-4
votes
1 answer
Blackjack, python
import random
import time
class card():
def __init__(self):
cardNum = ["1","2", "3", "4", "5", "6", "7", "8", "9", "10", "10", "10"]
randNum = random.randint(0, len(cardNum) - 1)
cardSuit = ["Hearts", "Clubs",…
![](../../users/profiles/10312178.webp)
K.Blemings
- 21
- 1
- 3
-4
votes
1 answer
Working on a blackjack style unity game. Can't read and write a file
So. I'm trying to make a save profile but I have the error shown in the picture and have no idea how to fix it as I have been following tutorials on YouTube and this error never occurred. Can anyone help me work out what I should do.
using…
![](../../users/profiles/10591464.webp)
HAllen
- 15
- 2