Skip to main content

No project description provided

Project description

takpy

Python wrapper for fast-tak.

Create a new game using takpy.new_game(size, half_komi).

from takpy import new_game, GameResult
game = new_game(6, 4)

while game.result() == GameResult.Ongoing:
    moves = game.possible_moves()     
    # pick move
    game.play(move)
  • game.possible_moves() gets a list of available moves in the current position.
  • game.play(move) is used to play a move in the game.
  • game.result() calculates the result of the game.

There are getters for game.board, game.to_move, game.white_reserves, game.black_reserves, game.ply, and game.reversible_plies.

You can find out more about how to use the library as part of my Takbot Tutorial.

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

takpy-0.8.0.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

takpy-0.8.0-cp311-none-win_amd64.whl (273.4 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

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