-
Notifications
You must be signed in to change notification settings - Fork 2
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
Magnets freezes with 3x3 Tricky #17
Comments
Hi, thanks for finding this bug. I can reproduce this via the local desktop version of magnets. The generation algorithm is indeed hanging in an endless loop for a 3x3 configuration at tricky level. Interestingly, also for 4x4 and even 4x5 tricky puzzles. This also explains battery drain when the app freezes that way. Unfortunately, introducing a timeout is not trivial. The original SGT puzzles are designed to stay completely inside the generation loop without returning until a puzzle is successfully generated. Best way to solve this would be to move game generation to a separate thread, but there I will need to find the time to code it. For now, I think I will quickly solve this by introducing lower size requirements for tricky puzzles, so that generation of too small tricky puzzles will be rejected. |
Quick-Fix by size limits implemented in 146edd0 4x5 tricky puzzles seem to be possible anyway, so I added according lower size limits to tricky puzzles. |
Thanks for putting in the quick fix. Maybe you can still simplify it. Now you put in a series of checks on dimension level. I had to confirm the warning and change values 3 times after trying to start a 3x3 game. 3x3 -> 4x3 -> 4x4 -> 5x4. The Android versions simply has one check/warning: "Either width or height must be at least five for Tricky". |
Unfortunately, this one check seems not to be sufficient enough. When I try to generate a tricky 3x6 puzzle, the generator also hangs. I think it is safest to leave the current check as it is, as it ensures that |
Hi Steffen,
I was playing around with the custom set-up of Magnets. I found when you try to create a game with 3x3 grid size and tricky difficulty the game freezes. The strip-clue option does not have an impact.
I also have the feeling that the battery gets drained when the app hangs. Could it be the app keeps trying to create a puzzle without time-out?
The text was updated successfully, but these errors were encountered: