Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create game struct #2

Closed
dnsbty opened this issue Mar 17, 2020 · 0 comments · Fixed by #10
Closed

Create game struct #2

dnsbty opened this issue Mar 17, 2020 · 0 comments · Fixed by #10
Labels
enhancement New feature or request

Comments

@dnsbty
Copy link
Owner

dnsbty commented Mar 17, 2020

We'll want a struct for managing the state of the game. This will depend on #1 and #3. I'm seeing this looking something like the following:

  • current_round
  • players: list of players
  • draw pile: list of cards in the draw pile
  • discard pile: list of cards in the discard pile
  • hands: map with a list of the cards in each player's hand keyed by player name
  • scoring: map of score objects (containing level and score) keyed by player name
  • table: map of tabled cards keyed by player name to represent what's been laid out

Table Example

%{
  "Dennis" => [
    {:set, [%Card{}, %Card{}, %Card{}]},
    {:run, [%Card{}, %Card{}, %Card{}]}
  ]
}
@dnsbty dnsbty added the enhancement New feature or request label Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant