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.

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

Uploaded Source

Built Distributions

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

takpy-0.5.0-cp312-none-win_amd64.whl (210.1 kB view details)

Uploaded CPython 3.12Windows x86-64

takpy-0.5.0-cp311-none-win_amd64.whl (225.2 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for takpy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 200e076726f5545f686b2b1634696e920622c21ca4ac1e927361c747c3a599e4
MD5 09379770d3e86c89e448348e66160b5e
BLAKE2b-256 cb7173a5cb2ca327d76a8c0032bda31ad00c8041af6e2d2db70642fe4849da5a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for takpy-0.5.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 b24e58554acf5dc60a7fd29c0a690cb29ee50b7604aaaf625f59e1185d8c8e8a
MD5 b339cad246f52dea1ef735e43bd04d58
BLAKE2b-256 0d25130b0b9141a414d30af3cf5db87cbf6796f42dd3a50f1c46588442223c01

See more details on using hashes here.

File details

Details for the file takpy-0.5.0-cp311-none-win_amd64.whl.

File metadata

  • Download URL: takpy-0.5.0-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 225.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.1.0

File hashes

Hashes for takpy-0.5.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 1fc6e0716603dd0b31ee920423ec4dd12c2ae11bddc3233bc49dabc9b50cb01c
MD5 84dd952dae06297cadca24f5b207af0e
BLAKE2b-256 86e941091a82833a826849fa196c828726ba281b6aefad6a269dbfc3cf23cb98

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