Skip to main content

A brain-teaser game

Project description

by Philippe Fremy phil@freehackers.org

Graphics by Ben Adler benadler@bigfoot.de

Ane Rouge All klotski boards

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 where all levels are from.

To run Klotski:

  1. If you are Windows, simply download the zip package here. Extract it and run the klotski.exe

  2. In other situations, you need to use Python to run it:

Klotski requires Python 3.5 (at least) and PyQt 5. To install Klotski, you must already have Python installed on your computer.

Type:

pip install klotski

To play:

python -m klotski

This was my first program using python and PyQt in 2001. 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++.

Contributions and feedback are gladly welcome. Especially, bug, new levels or new tile themes. To add new levels, just edit boards.kts, the format is pretty simple. To add new tile themes, look at pixmap/THEMES.txt and replace the image klotski-tiles.png .

For any bugs or feedback, please use the GitHub page: https://github.com/bluebird75/klotski

Full solution to Ane Rouge are available here.

Release history

v1.3.1: 16 May 2021

  • window may be resized smaller than the board, to fit smaller screens

v1.3: 10 September 2020

  • make it installable through pypi.org and pip
  • move project to GitHub
  • internal:
    • add type annotations
    • port from PyQt3 to PyQt5

version 1.2: 01 June 2006

version 1.1: 17 November 2004

version 1.0 : 23 January 2001

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Klotski-1.3.1.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

Klotski-1.3.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file Klotski-1.3.1.tar.gz.

File metadata

  • Download URL: Klotski-1.3.1.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/59.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.8

File hashes

Hashes for Klotski-1.3.1.tar.gz
Algorithm Hash digest
SHA256 215657aadc905d97bd7eba1b90b2362494be57dea3bccffdb1307bdc01afda47
MD5 a09fdf57bb69f61b455035446c113e9f
BLAKE2b-256 c69267a0c13855c728b4dc2d664aeb3e0e83cafade5c9da9023da22df8167704

See more details on using hashes here.

File details

Details for the file Klotski-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: Klotski-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/59.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.8

File hashes

Hashes for Klotski-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dfb7091f21f2a39fddc6dc1019700b9f2cd1d28e701db1b76a97d26467cd3fd6
MD5 19f449606d3503e513ddae17498ba49d
BLAKE2b-256 3b22a29c606f3de32981f3e2fec2298987d5d203f36b0c81ea35cf291601ea03

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page