Skip to main content

A Python chess game for two human players

Project description

KingSnake is a Python implementation of chess for two human players. Because players are also objects, an AI implementation would also be possible.

A simple text-based chess game can be started with the script kingsnake. This script calls KingSnake.py in xterm with a large font. If you don’t want to use the xterm terminal, you can call KingSnake.py directly.

KingSnake checks each move for legality and only allows legal moves to occur. However, because the library is open, you of course also have the possibility to move pieces around manually without invoking moves, making it possible to set up historical chess games and revel in the past.

This software is released under the GNU General Public License, so feel free to use it any way you like. It would be nice to let me know if you do anything cool with it though.

The package has reached 2.0 status relatively early. This is because, due to popular demand, I had released 1.3 with some added capabilities on move rollback. The resultant code was comfortable to use, but the performance was bad. As I fixed the performance problem, I cut out some of the outward-facing API of Chessboard, so that code dependent on features in 1.3 would have been broken. The same functionality is now there, but the method names didn’t match logically any more and I didn’t want to support the deprecate calls in probably-nonexistent client code. So… Don’t be sad, just update the package and enjoy the same functionality in performance mode! ;)

Author: Daniel Lee

Project details


Download files

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

Files for KingSnake, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size KingSnake-2.0.0.tar.gz (9.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page