i want to ask about how to build the black jack with using the c programming. i was wondering with other people whois making the same program as mine.
the matters are:
A pack has 52 cards consisting of 4 suits: Diamonds, Spades, hearts and Clubs. Each suite has cards 1 to 10 and J, Q, K
A card taken from a pack of cards cannot be replaced
The valid card value for Black jack is 16 to 21
The player and the computer are first given 100 credits each for each round of games
The player has to place bet (of credits) before each game
The Player and the Computer are first given 2 cards each using C randomising fucntion rand()
The plauer can decide to whether draw a next card or not
The game ends when both the player and the computer do not want any more cards
The player playing with computer cannot see the cards is holding unless until both players ends the games (by not needing any more cards)
The program need to make the computer take a card if its card value is 15 and below
A round can consist of many games. A round ends when either the Player or the computer has 0 credits or if the player wish to end it
When a round(of games) ends, the date, time, and the credits of both player and computer are written to a text file
When the user wish to see the game history, the program would read from this text file.
have to use a card data structure of 2 fields :
Suit (of character type can be "D", "H", "C", or "S")
Value (of character type, can be "1" to "10" and "J", "Q", "K")
May apply static (array) or dynamic (pointers) implementation
Game histore records are to be saved into a text file
May take any logical assumptions in the implementation
These all the points and rules are actually about the information that i needed concerning to the project i did,
i m just want to make sure, whether its correct or not, because i think i did in the wrong formulae or ways.