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

Feature/detect win #7

Merged
merged 12 commits into from Nov 9, 2019
Merged

Feature/detect win #7

merged 12 commits into from Nov 9, 2019

Conversation

chrisbouchard
Copy link
Owner

@chrisbouchard chrisbouchard commented Nov 9, 2019

Implement win detection. This entailed changes in the Settings and Area code to simplify lifetimes. Areas no longer hold a reference to the GameSettings and instead just copy out the particular fields they care about.

I've also introduced the new idea of Dealers, which are essentially factory objects for Game. It's the Dealer's job to generate, order, and place the the Cards to create a Game. This makes testing easier because now we have some "cheaty" dealers that always deal in order or always deal a win. There is a hidden setting to set the dealer.

Fixes #4.

@chrisbouchard chrisbouchard self-assigned this Nov 9, 2019
@chrisbouchard chrisbouchard merged commit 67026b2 into master Nov 9, 2019
@chrisbouchard chrisbouchard deleted the feature/detect-win branch November 9, 2019 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect when the player wins
1 participant