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.9.0.tar.gz (8.8 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.9.0-cp312-none-win_amd64.whl (277.2 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for takpy-0.9.0.tar.gz
Algorithm Hash digest
SHA256 fe05c9ab31fe35e0446e78a0320ebadd09868fa757c899ec4f3defa58cdef0ef
MD5 83b00305a2d3683e4a91e3443efc5b60
BLAKE2b-256 b8983c9bdd7cd94d31de8eb422e311d0213be0d11917abdc8603edc772c0016d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: takpy-0.9.0-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 277.2 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.9.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 3a9d8efa28dea573b3d7c17a1d0f317612a2062da2625c8ef03c3f88bfbcef3e
MD5 bbbcb7b3b362c16c631c64a6371be679
BLAKE2b-256 05cb4d4da1793d0727cc7f931964fee69d97838e4eb4a3fe351fa2d1525c34eb

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