[Kde-games-devel] moved Kajongg from playground to kdereview

Wolfgang Rohdewald wolfgang at rohdewald.de
Sun Feb 21 21:51:27 CET 2010


On Sunday 21 February 2010, Stefan Majewsky wrote:
> Am Sonntag, 21. Februar 2010 15:15:36 schrieb Wolfgang 
Rohdewald:
> > Well - Kajongg is python and it duplicates no python code. I
> > had to translate part of libkmahjongg from C++ to python
> > for access to the tiles and backgrounds, but while doing
> > that I also added some features libkmahjongg does not have
> > because KMahjongg / KShisen do not need it like showing
> > rotated tiles
> 
> This sounds to me like libkmahjongg should be extended, and
> bindings should be  added if they are not available yet.

what would be the concrete advantage for anybody doing this?
Speed would probably not improve significantly for Kajongg.

If somebody would like to do that, please look at my classes
Tileset, Tile and Board. IIRC, the API is different
from the libkmahjongg API.

I once had classes Shisen and Solitaire - those duplicated the 
standard tile layouts for those games, just for testing purposes.
This was the code:
http://websvn.kde.org/trunk/kdereview/kajongg/src/board.py?r1=1073211&r2=1073667

This would fix one bug in libkmahjongg, though: If in 
KMahjongg you click on the shadow of a tile, that tile
is selected even if there is another tile under that
shadow. The shadowed tile should be selected, not the
shadowing tile. This works correctly with my code
although I don't actually need this.

-- 
Wolfgang


More information about the kde-games-devel mailing list