Klotski is small brick game which has its root in a wooden game named (in french) "Ane rouge". The goal is to bring the red piece to its destination by moving other pieces. It sounds simple but it is a real brainteaser.
There was a klotski game on Windows 3.1, and this is were all levels are from. There is also a basic gnome version of klotski here. I had a look at it before starting Klotski, so some design ideas have probably slipped from there :-)
RequirementsOn Linux, you need python, Qt and PyQt. On windows, everything works by itself :-).
HistoryKlotski is written in python and uses the PyQt binding developped by Phil Thompson, to take advantage of the QCanvas from Qt.
This is my first program using python and PyQt. I must say I have enjoyed it a lot: Python and Qt are both excellent, easy to use and well documented. I have never been able to implement my ideas so quickly. The usual cycle "think, organise into organigram, code, compile, correct compiling errors, run, correct bugs, run, it works" was reduced to "think, code, run, it works". Because of the simplicity and the power the python language, my ideas could be expressed very clearly and I could concentrate on what I wanted to do instead of how I needed to code it. The result is a simple and clean program, that was coded in half the time (and probably less) it would have taken to do it in C++.
This program is Qt only for the moment, but as soon as the python bindings for Kde 2.0 are released, I will take advantage of them.
|1.0||2001-01-23||Unix version (35 k)|
|1.0||2001-01-23||Windows version (49 k)|
|1.1||2004-11-17||Unix version (35 k)|
|1.1||2005-04-16||Windows version with installer (2.5 Mb)|
|1.2||2006-06-01||Windows version with installer (2.5 Mb)|
FeedbackI'm always intersted in feedback, either good or bad. What would really interest me are contributions of new boards. Don't hesitate to send me a mail at : phil at freehackers.org.
You can also contribute to klotski. Look at the file boards.kts, it contains the description of the board in a simple format. Adding a new board is quite easy.
SolutionDue to many requests, I have put-up a solution of the most difficult puzzle, the dreaded "Ane Rouge". Solution is here but look at it only when you start to get desperate (this is, after at least one month of effort). It took me something like one month to find it. The real tricky part is the end: you have to make the red square change side else it won't go out.
Last modification : $Date: 2006/06/01 21:00:12 $ - $Author: philippe $