package
0.0.0-20250207190657-2f857293acf4
Repository: https://github.com/janpfeifer/hivego.git
Documentation: pkg.go.dev

# Functions

AbsInt8 returns the absolute value of an int8.
CompareBoards checks if two boards are the same or equivalent -- translation of board positions.
FilterPositionSlices filters the given positions according to the given filter.
LoadMatch restores match initial board, actions and scores.
NewBoard creates a new empty board, with the correct initial number of pieces.
No description provided by the author
No description provided by the author
SaveMatch will "save" (encode) the match and scores for future reconstruction.
SortPositions sorts according to y first and then x.

# Constants

Save versions: over time I keep adding new fields.
Save versions: over time I keep adding new fields.
No description provided by the author
No description provided by the author
No description provided by the author
DefaultMaxMoves after which the game is considered a draw.
No description provided by the author
No description provided by the author
MaxBoardRepeats after which a draw is issued.
No description provided by the author
NumNeighbors of each position: the board is hexagonal.
NumPieceTypes doesn't include the NoPiece type.
NumPlayers currently limited to 2.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TotalPiecesPerPlayer is the sum of the InitialAvailability.

# Variables

InitialAvailability at the start of a match.
No description provided by the author
No description provided by the author
No description provided by the author
Pieces enumerates all the pieces, skipping the "NoPiece".
No description provided by the author
No description provided by the author

# Structs

Action describe a placement or a move.
Board is a compact representation of the game state.
Derived holds information that is generated from the Board state.
PosStack represents a position and the stack of pieces in the position.
Surfaces are connected areas of the hive space, where an ANT could presumably move.

# Type aliases

Availability represents the number of each piece type available to a player to put on the board.
EncodedStack represents a stacked collection of pieces, typically in some location of the map.
PieceType currently limited to the 5 basic types plus a NoPiece, the null value.
PlayerNum is the either 0 or 1 corresponding to the first player to move or the second player to move.
Pos packages x, y position.
PosSlice is a slice f Pos.
PosStackSlice is a sortable slice of PosStack.