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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91cb515ffad4193a4947e3285f5ddc1285add2f2df5ffd1c1d4507f6a1039b11
|
|
| MD5 |
ef50ee963ff129c9a447c4be22bd5f9a
|
|
| BLAKE2b-256 |
eb769175492d331ec28d3e43a0bd2c30b709606883275bf1896efe1116db1e6c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae5e839ddc9c6916b5ff385991fccb4c3c9295bc16b46b0632d1ea5b374f71c7
|
|
| MD5 |
30e8d5d23cc38cc60d6537fffe0e20e7
|
|
| BLAKE2b-256 |
05dd88351f22c50d6565b0cb651ba3e3034d48b4795b45318b0e8911d31ae6e5
|