Crate takparse

Source
Expand description

takparse is a library which provides helpful types and functions for parsing objects related to the abstract strategy board game Tak.

Structs§

DropCounts
A helper struct for iterating over the drop counts encoded in a Pattern.
Move
Struct which represents a valid move in Tak.
Pattern
An encoded version of the drop counts.
Ptn
A PTN file which is used to document a game of Tak.
Square
A location on the board.
Stack
A stack is one or more pieces on top of each other. Yes, even a single flat on its own is considered a stack.
Tag
PTN Tag which is used to add additional information to a PTN file.
Tps
Parsed TPS struct which has a one-to-one mapping with a TPS string.

Enums§

Color
Enum for the player and piece color.
Direction
Enum representing a direction to move on the board.
ExtendedSquare
An entry in the TPS for a board position.
GameResult
The result of a game of Tak.
MoveKind
Container enum for the two types of possible moves in Tak.
ParseDirectionError
Error returned when something goes wrong during the parsing of a Direction.
ParseGameResultError
Error returned when something goes wrong during the parsing of a GameResult.
ParseMoveError
Error returned when something goes wrong during the parsing of a Move.
ParsePatternError
Error returned when something goes wrong during the parsing of a Pattern.
ParsePieceError
Error returned when something goes wrong during the parsing of a Piece.
ParsePtnError
Error returned when something goes wrong during the parsing of a Ptn.
ParseSquareError
Error returned when something goes wrong during the parsing of a Square.
ParseTagError
Error returned when something goes wrong during the parsing of a Tag.
ParseTpsError
Error returned when something goes wrong during the parsing of a Tps string.
Piece
Enum representing the piece type.
WinReason
The reason for a win in Tak.