|
||||||||||||||||||||
Is anyone out there good at C++ and have a program like this ? I have to do this for a class that I shouldn't even be taking but its a little late for that now. If anyone can give me some help or I would appreciate it.
Black Jack Program
Load the text document of cards into a randomized list. The computer will stop if the user wishes and retain the value. The dealer will keep gathering cards until it beats or ties the user. Whoever is closest to 21 without going over 21 wins. The game is ended as soon someone either reaches 21 or goes over. The user can place a bet before each draw.
A=1 or 14
J = 11
Q = 12
K= 13
House Rules:
If either the dealer or the user collect more than six cards then the first person to do so wins.
Also if the deck deals an Ace then depending on the total will convert to either to a 1 or 14 which ever will get them closer to 21.
Needed Elements:
Create three classes the deck, rules, and the user.
The deck class will gather the data from a file and place them randomly into a list. The constructor for deck class would take one parameter of the file location. Also the deck class will always draw from the end of the list. Lastly the deck class will remove the cards dealt and if the list becomes empty it will reload and randomize the cards back into the list.
The user class will track incoming cards and should know their face value and type. The user class must be design such that they might be used in other card games. The constructor accepts a parameter of how much starting money the user has. The user class should track which games and how much the user won at each game and only allow the user to bet his or hers winnings. If the amount is less then -100 do not allow them to bet and end the game with a message busted. Lastly the user class should display the total winnings or losses
The rules must be kept in a separate class. The rules class job is to apply the rule of the game, take bets and determine the winner. Determine who wins and dispense the winning. If more then one person then the winning are divided unless the winner is the dealer then the dealer takes all. Also the rule class should allow the user if they can to continue if there are no winners.
The main will control game play by using result from the rule class to determine if more input from the user is needed. If the user wishes add to the bet then that number is passed to the rules object. Also the main will allow the user to play again with the same used deck. Between each game the main show display on the screen the total winnings of the user and the computer.
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." -- Benjamin Franklin
Yes (Well, I used to be anyway).
This is a pretty staightforward programming exercise. You've already been given your class structure. Beyond actually writing your program for you, I don't have much in the way of useful advice. Sorry.
We tend to think of Sisyphus as a tragic hero, condemned by the gods to shoulder his rock sweatily up the mountain, and again up the mountain, forever. The truth is that Sisyphus is in love with the rock. He cherishes every roughness and every ounce of it. He talks to it, sings to it. It has become the mysterious Other. He even dreams of it as he sleepwalks upward. Life is unimaginable without it, looming always above him like a huge gray moon. He doesn’t realize that at any moment he is permitted to step aside, let the rock hurtle to the bottom, and go home.
Parables and Portraits, Stephen Mitchell
I think that's what he was hoping for.
somewhat what I eat...
http://www.thedailyplate.com/users/profile/stecson/
just start by writing out your pseudo code, and get your functionality down
then just go in and code in one function at a time.
Thing is that I am horrible at coding, and I mean horrible. So a project like this to me is no something I am going to be able to do.
If the project was to say build a computer from scratch with parts found in a large box and nothing with writing on it and some of them not working.... NO PROBLEM![]()
but not coding :-(
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." -- Benjamin Franklin
Bookmarks