KMahjongg generates non-solvable boards (at least when pressing shuffle)

Bug #181152 reported by Maarten Fonville
8
Affects Status Importance Assigned to Milestone
KDE Games
Unknown
Wishlist
kdegames (Ubuntu)
Won't Fix
Wishlist
Rich Johnson
kdegames-kde4 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: kdegames-kde4

KMahjongg generates non-solvable boards when pressing shuffle and I also suspect this is the case when generating the board (altough i cannot be sure).
The Gnome Mahjongg version is always generating a board that is in some way solvable. I suggest the same feature should be available for KMahjongg to make sure people have a 'fair game' they can win.

Revision history for this message
Harald Sitter (apachelogger) wrote :

You should report this on http://bugs.kde.org

Revision history for this message
Harald Sitter (apachelogger) wrote :

BTW, IMHO it shouldn't always create solvable games.

Shuffle means shuffle, total random, random like life can be, and that includes non-solvable mahjongg games as well as easy solvable ones.

Changed in kdegames-kde4:
status: New → Won't Fix
Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

I think it should be fixed because it has been fixed before (in bug http://bugs.kde.org/show_bug.cgi?id=21436 )
At least I submitted the bug now at bugs.kde.org and linked it with this bugreport.

Revision history for this message
In , Maarten Fonville (maarten-fonville) wrote :

Version: (using KDE 4.0.0)
Installed from: Ubuntu Packages
OS: Linux

KMahjongg generates non-solvable boards when pressing shuffle and I also suspect this is the case when generating the board (altough i cannot be sure).
The Gnome Mahjongg version is always generating a board that is in some way solvable. I suggest the same feature should be available for KMahjongg to make sure people have a 'fair game' they can win.

Changed in kdegames:
status: Unknown → New
Revision history for this message
TerryG (tgalati4) wrote :

Triaged to Confirmed. I assume that when you build a real Mahjogg board you can create a non-solvable stack so why should the computer version be different? You can always play the Gnome verison. I guess the KMahjohgg folks don't want to add a switch to preferences. It doesn't seem that difficult to solve.

Changed in kdegames:
status: New → Confirmed
Revision history for this message
Rich Johnson (nixternal) wrote :

Confucius say "Mahjong takes skill, strategy, and luck, not all Mahjong is solvable."

And seeing as Confucius is the great inventor of this game, I will listen to him. I do not think this should be a bug just because Gnome's version allows you to win, I am going to mark this as incomplete and wishlist, because I am willing to bet that upstream is going to mark the bug as invalid.

Changed in kdegames:
assignee: nobody → nixternal
importance: Undecided → Wishlist
status: Confirmed → Incomplete
Revision history for this message
In , Timhoppen (timhoppen) wrote :

Created attachment 26872
Screenshot of unsolvable game

This puzzle started off unsolvable. The matches for the tile at the very top
only two, not three) were all below it. When first ran out of moves, I had not
found a match for the top tile. I shuffled the board until I got to the point
depicted in the screen shot.

Revision history for this message
Harald Sitter (apachelogger) wrote :

New clue why this is marked incomplete... => new

Changed in kdegames:
status: Incomplete → New
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Closing this task for Kubuntu because:
-We aren't going to make this change unless upstream makes it
-Even if upstream implements it (which is unlikely), it will make its way into the next KDE feature release automatically. There is no advantage to track it here when it's being tracked in KDE already. It just takes up space here.

Changed in kdegames:
status: New → Won't Fix
Revision history for this message
In , Antonis Tsiapaliokas (kok3rs) wrote :

Hello

I have tried to reproduce the following bug but i could not. Because i won the game :) So i guess that there is no bug... Or this might be a kde 3 bug, since the screen shot which Tim has attached is from the kde 3.. Here is some information about my system.

OS: opensuse 11.3
kde: 4.5.73 (from the trunk)

In my way to try to reproduce the bug i have done the following steps:

1)run the game
2)shuffle
3)won the game

I have a screen shot from my win but i could not upload it because it too big...

Revision history for this message
In , Maarten Fonville (maarten-fonville) wrote :

The bug was valid on KDE 4.0
I don't know whether it is still valid, since I have no KDE install to my availability anymore.

Changed in kdegames:
importance: Unknown → Wishlist
Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** This bug has been marked as a duplicate of bug 314219 ***

Changed in kdegames:
status: New → Invalid
Revision history for this message
In , Mr. Anderson (walch-martin) wrote :

The shuffle option renders games unsolvable when used in conjunction with undo/redo operations (KDE 4.14.0).

It is pretty easy to reproduce:
* start a new game
* remove a matching pair
* undo removing
* shuffle
* redo removing

Unless the now newly removed tiles incidentally are the same as before, the game is now in an invalid state. (Things get even more crazy if you then shuffle again and again undo the last action.)

Reopening this bug as it involves the shuffle operation, which makes it different from bug #314219.

Changed in kdegames:
status: Invalid → New
Revision history for this message
In , Kdebugs-c (kdebugs-c) wrote :

Created attachment 90112
Disable redo after shuffle

This only address the problem described in Comment 5.

Looking at the shuffle code in GameData my understanding is that it just randomly swaps around the tile faces, so I think the first part is valid as well and not a duplicate of bug 314219.

Revision history for this message
In , Iandw-au (iandw-au) wrote :

Created attachment 90660
Shuffling CAN create an unsolvable game, as shown in these screenshots.

Changed in kdegames:
status: New → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.