• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Questions about what classes I should use

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic