• Post Reply Bookmark Topic Watch Topic
  • New Topic

Questions about what classes I should use  RSS feed

 
Jon Davis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a simple 5 card draw poker game, with only one player and no betting for now, and I am wondering what my classes should be. I have a Card and a Deck class, the Player class which will handle all the player inputs for now, a Hand class, which will contain the hand and handle scoring the hands, and a Dealer class, which will handle dealing the cards and shuffling. My question is should I have a Dealer class or should I have the deck handle the shuffling and dealing? And also should I have another class that handles the scoring of the hand, or have the Hand class do it. I haven't wrote anything yet, except for the Card and Deck class which was for a different project, I am just making a game plan for now. Any suggestions would be greatly appreciated.
 
Campbell Ritchie
Marshal
Posts: 56529
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no hard‑and‑fast answers. I think your list of classes is all right at the moment, but you can always change it if you encounter difficulties.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!