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
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
takpy-0.1.1.tar.gz
(5.9 kB
view hashes)
Built Distribution
takpy-0.1.1-cp310-none-win_amd64.whl
(190.2 kB
view hashes)
Close
Hashes for takpy-0.1.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9732abf0f4d17182c4bce1e5a886ad732f8a5f509c298ce5b88aea192fd7eba3 |
|
MD5 | 8c73827f9bf2f3d16ae77bc9be9b9cc6 |
|
BLAKE2b-256 | dba4ddfdb9def93c50c0fabc4b37cf16238cec5f0559340700aec49a6ef14e1f |