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.6.4.tar.gz
(8.3 kB
view hashes)
Built Distribution
takpy-0.6.4-cp312-none-win_amd64.whl
(213.5 kB
view hashes)
Close
Hashes for takpy-0.6.4-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ac96917f8ece64ea3d4017f7bd3ca83840f8885a5e5d05fcc1e4367d78d9d68 |
|
MD5 | 690831f2a4f4f5eb810eb3fe5e95e8b0 |
|
BLAKE2b-256 | 2acd7b6ff7e185f9dcf64371042eabc2e1bea2b1145ac9ac944dc500d129ba96 |