Block a user
tak-engine (0.1.0)
Published 2026-06-06 17:47:44 -05:00 by numbers
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+https://gitea.softwaresmyth.com/api/packages/numbers/cargo/" # Sparse index
# index = "https://gitea.softwaresmyth.com/numbers/_cargo-index.git" # Git
[net]
git-fetch-with-cli = truecargo add tak-engine@0.1.0About this package
Tak rules engine with serde types for wire opaque fields
tak-engine
Tak rules engine implementing game_core::Game. Provides board state, move
generation/validation, PTN/TPS import/export, and serde types for the opaque
JSON fields carried on the WebSocket wire.
Use with game-core for protocol envelopes and this crate for
Tak-specific mv, state, current_player, and outcome payloads.
JSON shapes (wire opaque fields)
Move (TakMove, internally tagged on type):
{ "type": "place", "kind": "flat", "at": "a1" }
{ "type": "spread", "from": "b2", "direction": "east", "drop": [1] }
State (TakState — abbreviated):
{
"ply": 2,
"board": { "size": 5, "squares": [] },
"reserves": { "white": { "flat": 21, "cap": 1 }, "black": { "flat": 21, "cap": 1 } }
}
See crate docs and tests for full shapes. PTN/TPS helpers are in ptn and tps
modules.
Dependencies
| ID | Version |
|---|---|
| game-core | ^0.1.0 |
| serde | ^1.0.228 |
| insta | ^1 |
| proptest | ^1 |
| rand | ^0.8 |
| serde_json | ^1.0.145 |