Bug 327974 - kMahjongg v0.8 generates maps with invalid tile combinations.
Summary: kMahjongg v0.8 generates maps with invalid tile combinations.
Status: RESOLVED FIXED
Alias: None
Product: kmahjongg
Classification: Applications
Component: general (show other bugs)
Version: 0.8
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-23 12:09 UTC by Rob Watson
Modified: 2016-01-04 01:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Watson 2013-11-23 12:09:19 UTC
According to the help for kMahjongg, each game generated should contain a specified number of each type of tile. However, some games are generated that have more than the specified number of some tile types. For example, in game #1,361,055,934 with the 'Alien' layout, there are clearly at least 6 tiles of the type '4 of characters', yet there should be no more than 4 in any set (according to the help/rules).

BTW, the 'launch bug report wizard' button in the Help/Report a Bug dialogue doesn't work, as it fails with "KDEInit could not launch '/opt/firefox/firefox'" (which of course doesn't exist).

BTW2: The list of applications on the bugs.kde.org web site lists this application as 'kahjongg" which is obviously wrong.

Reproducible: Always

Steps to Reproduce:
1. Run kMahgongg
2. Menu 'Settings' --> 'Configure KMahjongg'
3. 'Board layout' tab --> choose Alien
4. Menu 'Game' --> 'New numbered game'
5. Enter the game number above (1,361,055,934)
6. Start clearing some tiles and you'll see that there are too many (>4) '4 of characters' tiles.
Actual Results:  
There are 5 visible '4 of characters' tiles, so at least that many (an even number, hopefully!) in thus particular game.

Expected Results:  
Should only be 4 '4 of characters' tiles in any game.
Comment 1 Jan-Peter Nilsson 2014-12-22 23:07:27 UTC
The documentation describes a standard set of 144 tiles, the Alien layout requires 152 tiles so you will get some extra tiles in addition to the standard set.

I don't think there is any way around that,  when using a layout with fewer or more tiles some will have to be left out or added.
Comment 2 Frederik Schwarzer 2016-01-04 01:34:29 UTC
The docs say a "Standard Mahjong set of tiles" but also states that KMahjongg is a variation of the original Mahjong game known as Mahjong Solitaire.

I added the following paragraph to the docs in master (to be release with the next major update of Applications):
"The number of tiles on a KMahjongg board layout can differ from the number of tiles in the standard Mahjong tile set. That means that the number of occurences of tiles of the same type can also differ from the number stated in the table above."

Please reopen, if you think this does not fulill the requirement of a fix for this issue.