Skip to main content

Module types

Module types 

Source

Structs§

Bitboard
A set of squares represented as a 64-bit bitboard.
Move
A chess move packed into a 16-bit integer.
MoveList
A fixed-capacity, stack-allocated list of Move values.
MoveListIter
An iterator over the moves in a MoveList.
Piece
A colored piece, packed into a single byte.

Enums§

Color
A side in a chess game.
Direction
A direction on the chessboard (used for stepping computations).
File
A file (column) on a chessboard.
MoveType
The type of a chess move (normal, promotion, en-passant, castling).
PieceType
A piece type (pawn, knight, bishop, rook, queen, or commoner).
Rank
A rank (row) on a chessboard.
Square
A square on a chessboard indexed A1 (0) through H8 (63), plus NONE.

Constants§

B_BISHOP
B_COMMONER
B_KNIGHT
B_PAWN
B_QUEEN
B_ROOK
FILE_NB
Number of files on a chessboard.
MAX_MOVES
Maximum number of moves that can be generated for any atomic chess position.
NO_PIECE
RANK_NB
Number of ranks on a chessboard.
SQUARE_NB
Number of squares on a chessboard.
SQ_A1
SQ_A2
SQ_A3
SQ_A4
SQ_A5
SQ_A6
SQ_A7
SQ_A8
SQ_B1
SQ_B2
SQ_B3
SQ_B4
SQ_B5
SQ_B6
SQ_B7
SQ_B8
SQ_C1
SQ_C2
SQ_C3
SQ_C4
SQ_C5
SQ_C6
SQ_C7
SQ_C8
SQ_D1
SQ_D2
SQ_D3
SQ_D4
SQ_D5
SQ_D6
SQ_D7
SQ_D8
SQ_E1
SQ_E2
SQ_E3
SQ_E4
SQ_E5
SQ_E6
SQ_E7
SQ_E8
SQ_F1
SQ_F2
SQ_F3
SQ_F4
SQ_F5
SQ_F6
SQ_F7
SQ_F8
SQ_G1
SQ_G2
SQ_G3
SQ_G4
SQ_G5
SQ_G6
SQ_G7
SQ_G8
SQ_H1
SQ_H2
SQ_H3
SQ_H4
SQ_H5
SQ_H6
SQ_H7
SQ_H8
W_BISHOP
W_COMMONER
W_KNIGHT
W_PAWN
W_QUEEN
W_ROOK

Functions§

file_of
Return the file of a square.
make_piece
Construct a Piece from a color and piece type.
make_square
Construct a square from a file and rank.
rank_of
Return the rank of a square.