Metadata-Version: 2.1
Name: takpy
Version: 0.4.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# takpy

Python wrapper for [`fast-tak`](https://crates.io/crates/fast-tak).

Create a new game using `takpy.new_game(size, half_komi)`.

```py
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`.

