Bug 358496 - KMahjongg with "explosion" board layout contains unresponsive tiles with vertical edge exposed
Summary: KMahjongg with "explosion" board layout contains unresponsive tiles with vert...
Status: CONFIRMED
Alias: None
Product: kmahjongg
Classification: Applications
Component: general (show other bugs)
Version: 0.8
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Krippendorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-24 18:52 UTC by Ficus strangulensis
Modified: 2023-01-22 14:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ficus strangulensis 2016-01-24 18:52:11 UTC
Playing KMJ with explosion board layout, I was unable to complete the game due to multiple, unresponsive tiles [meaning the tiles did not 'light up' when clicked] even though they had a vertical edge exposed/free. I have saved screenshots of the remaining tiles and the layout chooser illustrating the faulty operation.

Reproducible: Didn't try
Comment 1 Ian Wadham 2016-01-24 22:08:16 UTC
I also have seen this happen with the Explosion layout.

The problem appears to be that the Explosion layout has a very large number of tiles and often fails to generate a puzzle.  Normally this should leave you with an empty background and a message in the status bar.  Then you can try again --- or try another layout.

If puzzle generation fails for Explosion when you are in the Settings dialog for Board Layout, you get an empty background in the layout Preview widget.  If you then click "OK", you get a garbage puzzle (not a proper Explosion layout, nor an empty background) and it has the problems you report.
Comment 2 Christian Krippendorf 2019-03-27 09:28:23 UTC
We should think about some solutions here:

1) Create try to recreate one for lets say a maximum of 5 seconds. But no matter how many repeats you do. The layout can fail.

2) Algorithm for create a layout without any failure. An algorithm bulding up a layout from scratch. Like the other way around as you would play it. This will lead to more time consuming board creation, but the created layout will be solvable for sure. Also it might not be possible to choose a specific layout. 

If someone wants to think about this design decision, I would implemented whatever is wanted.

Greetings
Comment 3 Ian Wadham 2019-03-27 10:56:17 UTC
Or one could make it fail more gracefully, with popup "sorry" KMessageBox's for each failure path and an invitation to try again... rather than showing just a blank screen and an inconspicuous status bar message or allowing an invalid puzzle to be entered.

@Christian, re your alternatives 1) and 2): 1) should be quite doable, but 2) could be difficult. I have no ideas on that.