Skip to content

Re-organizing hearts class structure #7

@alecbenson

Description

@alecbenson

Pat and I talked about re-arranging the game structure to include five main classes:

  • Hearts
    • The class that contains all of the logic pertaining to playing hearts
    • It is responsible for scoring hands and applying points to players
  • Game
    • The game class contains the basic structures that need to be present for a card game
    • This includes structures for players
    • Contains a series of rounds within a game
  • Round
    • Is represented as a series of tricks within a game
    • Contains logic for determining if the round is a passing round or a holding round. (this may be moved to the hearts class later, but for now, we think it belongs here)
  • Trick
    • Consists of four turns, one by each player
    • Contains a list of cards played in each turn
  • Turn
    • Tracks the player whose turn it is to move

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions