Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent falling back to a random card except in very rare circumstances
As pointed out in #121, it was previously possible for duplicate years or even duplicate cards to be drawn because we'd fall back to the random card choice too often. This was because the tooClose function could return true too easily for certain circumstances. This makes it so tooClose is slightly less strict, but also only applies that function as a second pass, meaning we should fall back to a set of relevant cards instead of the whole deck.
- Loading branch information