Version: 0.8 (using KDE 4.3.1) OS: Linux Installed from: openSUSE RPMs kmahjongg used to work properly some weeks ago. now it always* generates an odd number of tiles. the option "generate solvable" does not have any effect on this. (*) tryed it ~15 times
I can confirm this bug, but as far as I tested it, this bug only affects the "maps" named 'Castle', 'Explosion', 'Penta' and 'Pillars'. All the other maps from A to S should work fine. At least I never had a problem with one of the others ... (Version: 0.8, KDE 4.3.5, Opensuse RPM)
I ran across this bug independently. Even when "Generate Solvable Games" is checked, the board "Castle" creates an odd amount of tiles, rendering that board unable to win. This is a good implementation otherwise, so it just needs a small adjustment on the boards that create situations where you can not win. Also see bug #156022, which causes an situation where you can't win even with an even amount of tiles. Thank you. Kmahjongg version 0.8 on Kubuntu 10.04 LTS
I would like to confirm the problem with the layouts mentioned above and some others ("alien") I experienced another problem with layout "explosion": If I select it in the configuration dialog, it is incomplete, saying "Removed 45 / 139" and "Error while creating the game" (messages translated, I have a German version here). Also, when I create a new "explosion" layout, it sometimes does not show any tiles, in the status bar I get Removed: 0 / 139, Remaining pairs: 13 and also the error message. I am running Sidux (Debian SID) KDE 4.4.4 . KMahjongg 0.8
The "Alien" board layout always seems to use an odd number of tiles, making it impossible to solve. For example I got down to one tile left in game 1,923,144 and the status bar said "Removed 150/151 Combinations left 0" and so I lost. What a ripoff ... :-)
I have run a small script to try and identify the layouts that have odd numbers of tiles. Its intention is to extract and count all the 1's in the layout lines. There seem to be 6 odd layouts out of 72. My script and list is: for f in *.layout; do echo $(cat $f | grep -v '^[a-z#]' | tr -d "\n.a-z234" | wc -c) $f; done | grep -v '[02468] ' 151 alien.layout 131 atlantis.layout 157 castle.layout 139 explosion.layout 129 penta.layout 117 pillars.layout Please can these layouts be fixed or even removed? Maybe you could add or subtract a tile in each layout. Possibly some of these layouts got corrupted on editing from v1.0 to v1.1 layout format, so maybe you would need to revive an older revision. At the worst, you could add a tile in an empty area of the board, which would leave the game-play and difficulty of the layout much the same as it was before, but at least you could win ...
*** Bug 251961 has been marked as a duplicate of this bug. ***
I agree with Ian here, that a simple ugly fix like putting another stone somewhere is better than doing nothing. I would like to do this but I do not understand the layout format. Is there a description of it somewhere?
I do not recommend hand-editing the format and anyway there are two formats: old one for fixed-size board and new one for variable-size. Have a look at the code Editor.cpp, Editor.h and the commented-out hooks in kmahjongg.cpp. They should get you going, maybe with a local hack on CMakeLists.txt or even the ui.rc file. All the best with this ...
Guys, please take a closer look at bug 251961, as it contains a fix for castle.layout. I will look into the other ones mentioned here as well. Sorry for not finding this bug and filing a duplicate. Ian: In fact, I created these by hand in the first place (many were based on those for KDE3 KMahjongg, though), so hand-editing is not that awful :-)
Editing by hand? A heroic effort, Alexey, even if you know the format ... :-) Seriously, it looks as though nobody ever copied and committed your corrected castle.layout ... Whose job is that? If you have commit access, Alexey, you could commit corrected layouts yourself. Otherwise, one of the KDE Games team could. Just ask.
Created attachment 51919 [details] Fixed alien.layout
Created attachment 51920 [details] Fixed atlantis.layout
Created attachment 51921 [details] Fixed explosion.layout
Created attachment 51922 [details] Fixed penta.layout
Created attachment 51923 [details] Fixed pillars.layout
I tried to preserve the visual appearance of the layouts as much as possible, and just added/removed some tiles as applicable. Just put these (and castle.layout from bug 251961) in place of the currently broken ones in your system (/usr/share/apps/kmahjongg/layouts in my case). Ian: No, I have no commit access. In fact, I've only recently filed that fix, as another user contacted me regarding the breakage. So, I hereby ask for a commit :)
Mauricio Piacentini is the usual maintainer of KMahjongg, but he is distracted from working by his young son crawling between his legs. OTOH my grandchildren do not get back from holiday till Monday, so I will do the commits for you in the next few days. If you have any more layouts or levels for KMahjongg or any other game, Alexey, they are always welcome, but it is easiest to contact the game's maintainer or author direct by email and ask how he/she would like to handle them.
SVN commit 1179575 by ianw: BUG: 221132 fixed. KMahjongg layouts with odd numbers of tiles, making them impossible to solve, are modified to have even numbers. Many thanks to Alexey Charkov for these modifications. M +2 -2 alien.layout M +2 -2 atlantis.layout M +2 -2 castle.layout M +2 -2 explosion.layout M +2 -2 penta.layout M +2 -2 pillars.layout WebSVN link: http://websvn.kde.org/?view=rev&revision=1179575
The fixes should be in KDE 4.5.2 (release due 5 Oct 2010) and also in KDE 4.6. Thanks again, Alexey.
*** Bug 261366 has been marked as a duplicate of this bug. ***
*** Bug 277910 has been marked as a duplicate of this bug. ***
*** Bug 332029 has been marked as a duplicate of this bug. ***