jmonticelli / 1530_Premature_Optimization

1530 Repo for team Premature Optimization
0 stars 0 forks source link

System Architecture/Classes #6

Open Nathan-Davidson opened 7 years ago

Nathan-Davidson commented 7 years ago

We need to decide what we want. I think there are four classes here, from a relatively high level perspective:

  1. The Board.
  2. The Players.
  3. The Deck.
  4. The Cards.

Some questions about how things would be set up:

  1. Does the player draw the card (method of Player class) or is the card drawn from the deck (method of Deck class)?
  2. Is the player's location stored internally to the player, or internally to the board?
brandonhedges82 commented 7 years ago
  1. I think it might be helpful for the player to draw the card in case the player needs to keep a reference to last several cards drawn by that player for some reason.

  2. I think the board should be responsible for knowing the player's location. This allows for easier interaction between players(If necessary).

I am ok with doing those either way though. It doesn't matter to me

Nathan-Davidson commented 7 years ago
  1. Reasonable.
  2. I'm not as sure here. Having the player know their own position makes checking a player's position substantially faster, though it incurs the risk of players somehow having invalid positions.