My primary goal is to create a Euchre game in Python. Euchre card games are rare on the Linux platform, no matter the language or the desktop flavor of choice. For now I want to be able to just create a simple game like BlackJack or Rummy. My platform is Linux Mint 17, and I'm using PyCharm.
The thing that is stumping me beyond any obstacles I can think of is the design of the classes. In my mind I see classes such as these:
Deck (deck of cards) Card (a single card) Hand (series of cards) Player (person playing the game) Dealer (person dealing the cards)
More specifically, it's the actions of those classes that is bothering me. Actions that confuse me are:
- dealer dealing the cards. does the Dealer remove the cards from the deck, or does the deck remove the cards?
- player receiving cards. Does the player place the cards into the hand, or does the Dealer do that?
- shuffling the cards. Is this an action performed by the deck, or does the Dealer do this?
PlayerManager
orDeckShuffler
orHandRank
orGameFlowInspector
etc. is perfectly fine. Such classes represent things that don't really exist as objects in the real-world, but they help you better decouple and manage the rules and laws of the game.