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

Also also prevents falling back to random card by moving epoch method #123

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rowboat1
Copy link
Contributor

@rowboat1 rowboat1 commented Jul 1, 2024

Deals with fallback issue discussed in #121 and #122, but allows us to do things in one pass by massively reducing the chance of covering a whole epoch.

Does this by simply shifting the year from which the most recent era is measured for the few most problematic rounds.

Otherwise preserves the tooClose function as originally described

This solution provides a mathematical guarantee if we assume there is at least one card for every year (which is either not true or at least not guaranteed to be true forever).

Closes #103, addresses same as #122

rowboat1 added 4 commits June 28, 2024 21:09
The tooClose function will always hit if you draw too many early cards in the 1800-2020 range

When the tooClose function rules out all cards, the game defaults to drawing a random card from the deck without any other failsafes.

One of the failsafes in tooClose is to ensure cards are at least 1 year away from any existing card.

Without this failsafe, we can have ties (which fail on a coinflip) and in some cases even a duplicate card being drawn.

We also lose all the other balancing effects of avoidPeople and splitting cards into three different periods.
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.

Duplicate card in game
1 participant