Sunday, July 12, 2009

C++ Computer Programing please help?

I am having to write the following program: ( we are using the program Blood Shed Dev-C++)


Define the deck and shuffle the cards


Ask user how many players there are and what their names are.


Ask the user how many cards each player should receive.


Deal out the shuffled cards to the players, starting with the first player and going around.


For each player's hand count how many of each suit he/she received. Also count how many high and low cards they recieved. Print out each player's hand and summary ingo in the following format:


Billy Bob


_______________________


A Spades, 2 D, J D, 9C, 4H


summary: s(1), H(1), D(2), C(1), high (2), low (3)

C++ Computer Programing please help?
Well...





- I see a Card class,


- and an (abstract) CardStack class that is a list of cards,


- Descended from the CardStack class are a Deck class and a Hand class (to represent the cards in each player's hand),


- There is also a Player class - one object for each player, that contains the player name and hand.


- you can either put a Shuffle method on the Deck class, or generate a separate CardShuffler class that randomizes either a CardStack or Deck,


- There is a Dealer class to handle dealing the cards from the Deck in the order specified. It also has a "max cards" property to determine how many cards each Player receives.


- There is also a PlayOrder class that defines the order the Players play in.


- Finally a composite class (CardGame) to tie it all together.
Reply:sound like your making a game blood shed dev i use all the time its great with sdl which is less complex than c++ link for the website below and also for a website to learn how to use it with bloodshed dev will make your programming so much easier and shows you how to set it up......card games are mostly random numbers thou





http://www.libsdl.org/index.php





http://sol.gfxile.net/gp/
Reply:omg, just write yourself...


No comments:

Post a Comment