posted 18 years ago
There are two bugs in my Blackjack program. The first: it prints every card before the game starts. Buggery. The second: it draws the same card every time. Double buggery.
Ace of Hearts //first problem
King of Spades
Queen of Clubs
Jack of Diamonds
Ten of Hearts
Nine of Spades
Eight of Clubs
Seven of Diamonds
Six of Hearts
Five of Spades
Four of Clubs
Three of Diamonds
Two of Hearts
Ace of Spades
King of Clubs
Queen of Diamonds
Jack of Hearts
Ten of Spades
Nine of Clubs
Eight of Diamonds
Seven of Hearts
Six of Spades
Five of Clubs
Four of Diamonds
Three of Hearts
Two of Spades
Ace of Clubs
King of Diamonds
Queen of Hearts
Jack of Spades
Ten of Clubs
Nine of Diamonds
Eight of Hearts
Seven of Spades
Six of Clubs
Five of Diamonds
Four of Hearts
Three of Spades
Two of Clubs
Ace of Diamonds
King of Hearts
Queen of Spades
Jack of Clubs
Ten of Diamonds
Nine of Hearts
Eight of Spades
Seven of Clubs
Six of Diamonds
Five of Hearts
Four of Spades
Three of Clubs
Two of Diamonds
Player gets a Eight of Hearts //Look! It works!
Dealer gets a Eight of Hearts //Wait, no it doesn't.
Player gets a Eight of Hearts //BUGGERY.
Dealer gets a card.
Would you like to take a hit or stand? (H/S) //I would like this program to work!
I don't know what parts of the code are affecting what. This is my second large program, and the vastness of it all tends to give me a headache. So here's the code in its entirity: