+ 2

blackjack on c

how to make the game blackjack on c using lists (( help please

7th Dec 2022, 10:40 AM
saty
saty - avatar
11 Answers
+ 2
Overall, creating a game of blackjack using lists in C will require a combination of data structures, algorithms, and user input/output logic. It will likely take some time and effort to implement all of the necessary components, but with careful planning and implementation, you should be able to create a working game.
8th Dec 2022, 2:41 PM
THATguy18
THATguy18 - avatar
+ 2
To create a game of blackjack using lists in the C programming language, you will need to use a few different techniques. Here is an outline of the steps you could take:
8th Dec 2022, 2:38 PM
THATguy18
THATguy18 - avatar
+ 2
Define a struct to represent a card. The struct should include fields for the card's suit and value.
8th Dec 2022, 2:38 PM
THATguy18
THATguy18 - avatar
+ 2
Create a deck array of structs to represent the deck of cards. Initialize the deck with the appropriate suits and values.
8th Dec 2022, 2:39 PM
THATguy18
THATguy18 - avatar
+ 2
Use a shuffle function to randomize the order of the cards in the deck. This will ensure that the cards are dealt randomly each time the game is played.
8th Dec 2022, 2:39 PM
THATguy18
THATguy18 - avatar
+ 2
Create a hand array of structs to represent the player's hand. This array should initially be empty.
8th Dec 2022, 2:39 PM
THATguy18
THATguy18 - avatar
+ 2
Implement a deal function that takes a card from the top of the deck and adds it to the player's hand. The function should also update the player's score based on the value of the card that was dealt.
8th Dec 2022, 2:40 PM
THATguy18
THATguy18 - avatar
+ 2
Implement a hit or stand function that allows the player to choose whether to take another card or keep their current hand. If the player chooses to hit, the deal function should be called to add another card to their hand. If the player chooses to stand, the game should move on to the next step
8th Dec 2022, 2:40 PM
THATguy18
THATguy18 - avatar
+ 2
Use a compare function to compare the player's score to the dealer's score. If the player's score is greater than the dealer's score, the player wins. If the dealer's score is greater, the dealer wins. If the scores are equal, the game ends in a tie.
8th Dec 2022, 2:40 PM
THATguy18
THATguy18 - avatar
+ 2
Implement any additional gameplay mechanics or features that you want to include in your game, such as the ability to split or double down.
8th Dec 2022, 2:41 PM
THATguy18
THATguy18 - avatar
+ 1
thank you so mush for help, but i m a beginner, so its hurd for me to write such codešŸ˜­ i need to write a program by next week, i ll try, thanks šŸ™‚
8th Dec 2022, 2:56 PM
saty
saty - avatar