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

Randomize mine items only in places it can fit. Hence fix 0 item bug #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fujnw
Copy link

@fujnw fujnw commented Mar 17, 2019

This essentially combines 3ae3c90#diff-179a97f89e4d8cc0cce87781606fe8b5 and https://github.com/Ishadijcks/Ishadijcks.github.io/pull/175/files to fix the underground.

Currently, underground randomizes items between 1 and max-3, then checks if items can fit. As a result, some larger items are not guaranteed to fit. Some people may be very unlucky and have all 3 of their items not fit and create the "zero items bug".

Here, we always guarantee the successful addition of the first item, by randomizing for spots that the item can fit.

Note: this is basically the same as pokeclicker/pokeclicker@afaf88d#diff-c337aaee8e9ee46ce006207353a43b08 in the TypeScript rewrite.

@Ishadijcks
Copy link
Owner

Looks good!

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.

2 participants