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.

Source Distribution

KingSnake-2.0.0.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file KingSnake-2.0.0.tar.gz.

File metadata

  • Download URL: KingSnake-2.0.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for KingSnake-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1d7782954e77ec76397f92b4d28161066bb2879f063b0ae099e2c2693be0da5c
MD5 fffb71605a8fb4fe07c6389b4a456888
BLAKE2b-256 ba17511b466b28b665264082ce4357246e1359f6c3a744078fc24208a6158a85

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