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

Fix: "Ensure Solvable" not saved #8

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

Conversation

portasynthinca3
Copy link

@portasynthinca3 portasynthinca3 commented Aug 16, 2024

I have noticed that the "Ensure Solvable" setting is not saved. Here's the fix in case this is unintentional. Hopefully; I have not tested the code.

@squee72564
Copy link
Owner

@portasynthinca3 Hello, thank you for the pull request and thank you for playing!

Please take a look at this issue that was submitted about this problem. My rationale for not saving the "ensure solvable" variable was that if the user has a large board and it is enabled it could take a while to generate a valid board leading to a freeze up when continuing pas the start screen of the app, and therefore a reduced quality of experience.

This is something that I want to avoid in general for QOL reasons. It is very amateur and not something I am proud of at the moment.. Some ideas that were given was to set a default number of tries/time limit before the board generation fails; I have also thought about adding some separate functionality to allow the user to stop the board validation algorithm whenever they would like in the case of a long wait time.

I would need to slightly restructure things to implement one of these changes and haven't gotten around to it yet, but it is definitely needed as multiple people have brought it up now.

I will test out your fork and see how the experience is on boards like 32x32, 32x8, 32x16 with the hard setting, which seem to be the boards that take a while to randomly generate a solvable board. I would appreciate if you try your branch and can also give some input as to if it lags up a lot past the start screen, or if it doesn't really affect it that much.

Again I appreciate the contribution! If it works out well enough I can merge it, or I can get around to finding a more elegant solution.

Thank you,
Alex R

@portasynthinca3
Copy link
Author

Thank you for your detailed response! Sure, I'll test it. Just from experience, with my favorite settings of 24x18 in Hard mode, the board usually takes no more than a couple of seconds to generate, which I personally think is acceptable. As you said, a proper solution of this problem would probably be to fix the board generation algorithm. I'll look into it

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