[Kde-games-devel] Tiles in KShisen

Mauricio Piacentini piacentini at kde.org
Mon Jan 19 16:44:08 CET 2009


Frederik Schwarzer wrote:
> Hi,
> 
> I had a look at the KShisen bugreports and there are two issues that are
> caused by the tile sharing with kmahjong. Or at least it seems so in my
> untrained eyes. :)
> 
> 1. the border is broader than the one in the kde 3 version
> Related report: http://bugs.kde.org/show_bug.cgi?id=156645
> As I can see it the border (or rather the size of the tile grid) is
> calculated through the preferredTileSize() method than comes from
> libkmahjongg/kmahjonggtileset.h
> Having a border that wide is fine in KMahjong. In KShisen though it
> looks a bit unfortunate if you are playing a large grid.
> What would be a "clean" way to shrink the border for large grids in
> KShisen?

I looked at preferredTileSize() and I think it is doing the right thing: 
you pass the boardsize to it, and it tries to find the maximum size of 
the tiles that will fit this area and maintain the proportion. But of 
course it might be buggy: how big is the border you are seeing? Is the 
smaller border (width or height one) larger than one tile?

> 2. Tile set "Alphabet" does not work correctly
> Related report: http://bugs.kde.org/show_bug.cgi?id=155600
> The report says it all quite accurate.
> The matching rules are just different (depending on your settings in
> KShisen).
> Is this something that has to be fixed in the tileset or in the app(s)?

This is something that probably needs to be addressed in the tileset, as 
it was done following KMahjongg matching rules. This is a difficult one, 
though. We need to discuss this in more detail: I see that the author 
tried to make it easier for children to match the flowers and bamboos, 
but this does not work for KShisen. The tileset is popular, though. So 
maybe we need to add a property to the tileset .desktop that controls 
this, and maybe prevent loading in a given client depending on matching 
rules. We could then increase the tileset format version and patch 
KMahjongg/KShisen to recognize this.

Regards,
Mauricio Piacentini


More information about the kde-games-devel mailing list