Skip to main content

Package for the both Chinese poetry and chess game. The rules of the game

Project description

License Docs Contact Site

Chess Bead Game

Description

Package for the both chess and Chinese poetry game. The rules of the game involve chess moves from games in pgn format. The board for the game is a Chinese poem of the Tang era, in which the line is equal to 7 characters (the last, 8th vertical is most often punctuation marks). When a piece makes a move, the characters on the board change places. The character on which the piece was is moved to the place of the character to which the move was made.

How the game works.

You can get the result texts and visualize it with the package.

You can use custom game in PGN format.

Inspired by Das Glasperlenspiel by Hermann Hesse.

Quick start

import chess_bead as cb

g = cb.Game()                       # use random chess game from the example PGN
                                    # file included in the package
verses = g.start_game()             # get all the permutations in the poem
v = cb.Viz(verses, g.author, g.title)    # prepare visualization
v.gif()                             # make the GIF animation with the name
                                    #'game.gif' in the working directory
del v                               # clean up the tmp dir

Installation

The tool could be installed with pip

pip3 install chess_bead

Examples and Docs

You can explore the brief examples that could give you a clue. For the deep sinking read the documentation.

External resources

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

chess_bead-1.0.2.tar.gz (8.1 MB view hashes)

Uploaded Source

Built Distribution

chess_bead-1.0.2-py3-none-any.whl (7.4 MB view hashes)

Uploaded Python 3

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