Skip to content

Latest commit

 

History

History
69 lines (61 loc) · 1.83 KB

design.md

File metadata and controls

69 lines (61 loc) · 1.83 KB

Design Documentation

I would like to design the program using more formal Python development methodologies.

I will break it down in the following way:

Classes/Objects

  • Attributes

  • Methods


Cards

  • Attributes
    • Suit --{hearts, spades, etc..}
    • Color --{red or black}
    • Value --{3, 9, K, A, etc..}
    • Attack --{current attack value}
    • Defense --{current defense value}
    • Ability --{pointer to ability rule}
    • Trait --{pointer to trait rule}
    • Facing --{up or down}
    • Location --{pointer to collection}
    • Owner --{pointer to player}
  • Methods
    • ModifyValue (value, how, amount)
    • Flip (collection, card)
    • SetOwner (player)

Collections

  • Attributes
    • Name --{Deck, Barrows, Hand, Front Ranks, etc..}
    • Cards --{list of cards}
    • Owner --{pointer to player}
    • SizeLimit --{maximum number of card for collection}
  • Methods
    • Draw (card, destination)
    • Discard (card, destination)
    • Deploy (card, destination)
    • GetRandom ()
    • GetNext ()
    • AddCard (card)

Players

  • Attributes
    • Name --{player name}
    • Number --{player number}
    • Health --{player health}
    • Current --{yes or no}
  • Methods
    • ModifyHealth (how, amount)

The card's special abilities and house traits will be difficult to manage. I'm listing these here for future consideration.

Abilities

  • Attributes
    • --{}
  • Methods +

Traits

  • Attributes
    • --{}
  • Methods +

###NOTES:

  1. I am considering that the game itself will need to be a "player". For example the game (player 0) needs to have ownership of the Deck, Barrows, etc..
  2. The Draw methos would default to pulling the top card. However if a player is able to draw a specific card, then the card param must be passed