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.10.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

takpy-0.10.0-cp312-none-win_amd64.whl (264.5 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file takpy-0.10.0.tar.gz.

File metadata

  • Download URL: takpy-0.10.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for takpy-0.10.0.tar.gz
Algorithm Hash digest
SHA256 91cb515ffad4193a4947e3285f5ddc1285add2f2df5ffd1c1d4507f6a1039b11
MD5 ef50ee963ff129c9a447c4be22bd5f9a
BLAKE2b-256 eb769175492d331ec28d3e43a0bd2c30b709606883275bf1896efe1116db1e6c

See more details on using hashes here.

File details

Details for the file takpy-0.10.0-cp312-none-win_amd64.whl.

File metadata

  • Download URL: takpy-0.10.0-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 264.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for takpy-0.10.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 ae5e839ddc9c6916b5ff385991fccb4c3c9295bc16b46b0632d1ea5b374f71c7
MD5 30e8d5d23cc38cc60d6537fffe0e20e7
BLAKE2b-256 05dd88351f22c50d6565b0cb651ba3e3034d48b4795b45318b0e8911d31ae6e5

See more details on using hashes here.

Supported by

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