[Kde-games-devel] KSame and Klickety [was Re: Hello]

Nicolas Hadacek hadacek at kde.org
Mon Jan 29 10:36:10 CET 2007


On 1/28/07, Tomasz Boczkowski <tboczkowski at onet.pl> wrote:
> Klickety, kfouleggs and ksirtet seem to break all the rules of good
> program design. Libksirtet, that is used by the games is unnecessarily
> complex, undocumented and duplicates a lot of code from libkdegames. In
> my opinion the applications should be rewritten from scratch.

That's true but you have to consider that the code duplicated in
libksirtet and libkdegames (I assume you're talking about the network
code and multiplayer code) was written before there was an
implementation in libkdegames.
The rest of libksirtet was an attempt to factorize code from ksirtet,
kfouleggs and klickety and so it had to support different behaviours:
by the way there is a incomplete DESIGN file in the libksirtet
directory...
You also have to consider that this code was written without QCanvas
at the begginning and that some of the code is now 10 years old...

Ok enough justifying the (poor) state of my code. I would be quite
happy if somebody would do a rewrite of all this code but don't
underestimate the effort...

> Porting kfouleggs and ksirtet to SVG, that is my duty, is impossible
> concidering the state of code. I can try to rewrite them but I was
> looking for somewhat easier job.

It seems like a first porting should be quite straightforward:
currently the pixmap are drawn in:
libksirtet/base/piece.cpp:GPieceInfo:pixmap()
and in (for ksirtet):
ksirtet/piece.cpp:KSPieceInfo::draw()
ksirtet/piece.cpp:KSPieceInfo::setMask()

Regards,
Nicolas


More information about the kde-games-devel mailing list