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

Auto-reshuffle more often #29

Open
hen opened this issue Mar 15, 2020 · 1 comment
Open

Auto-reshuffle more often #29

hen opened this issue Mar 15, 2020 · 1 comment

Comments

@hen
Copy link
Contributor

hen commented Mar 15, 2020

Discord request to reshuffle more often.

Ideally every time the deck is empty (maybe there's an event for that?), at the least when doing Draw X.

@zz1000zz
Copy link
Owner

There's no event triggered when a pile becomes empty so the only way to do this would be to track every card movement. That is doable as movement is already tracked for the Undo command, but I'm not sure what scenarios would be caught by it that aren't caught already.

As for reshuffling while drawing cards, the code is currently setup to reshuffle when a player tries to draw a card and there are no cards left in their deck, or if the deck runs out while flipping. The only time it shouldn't reshuffle under the current system is if the last card you draw is the last card of your deck. I think it'd make sense to switch that to match the flip approach, where if the last card you flip (or in this case draw) is the last card of your deck, it reshuffles immediately.

Other than that, are there any scenarios the deck should reshuffle under where it currently does not?

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

No branches or pull requests

2 participants