Module pleco::templates [] [src]

Miscellaneos functions, traits, and constants to be used by other modules.

Enums

CastleType

Types of Castling available

File

Enum for the Files of a Chessboard.

GenTypes

Publicly available move-generation types.

Piece

Enum for all the possible Pieces.

Player

Enum to represent the Players White & Black.

Rank

Enum for the Ranks of a Chessboard.

Square

Squares available to play

Constants

ALL_FILES
ALL_PIECES
ALL_PLAYERS
ALL_RANKS
BLACK_SIDE
BLANK_BIT_BOARDS
CASTLING_PATH
CASTLING_PATH_BLACK
CASTLING_PATH_BLACK_K_SIDE
CASTLING_PATH_BLACK_Q_SIDE
CASTLING_PATH_WHITE
CASTLING_PATH_WHITE_K_SIDE
CASTLING_PATH_WHITE_Q_SIDE
CASTLING_ROOK_START
CASTLING_SIDES
EAST
FILE_A
FILE_B
FILE_BB
FILE_C
FILE_CNT
FILE_D
FILE_DISPLAYS
FILE_E
FILE_F
FILE_G
FILE_H
NORTH
NORTH_EAST
NORTH_WEST
NO_SQ
PIECE_CNT
PIECE_DISPLAYS
PLAYER_CNT
RANK_1
RANK_2
RANK_3
RANK_4
RANK_5
RANK_6
RANK_7
RANK_8
RANK_BB
RANK_CNT
RANK_DISPLAYS
ROOK_BLACK_KSIDE_START
ROOK_BLACK_QSIDE_START
ROOK_WHITE_KSIDE_START
ROOK_WHITE_QSIDE_START
SOUTH
SOUTH_EAST
SOUTH_WEST
SQ_CNT
SQ_DISPLAY_ORDER
START_BIT_BOARDS
START_BLACK_OCC
START_B_BISHOP
START_B_KING
START_B_KNIGHT
START_B_PAWN
START_B_QUEEN
START_B_ROOK
START_OCC_ALL
START_OCC_BOARDS
START_WHITE_OCC
START_W_BISHOP
START_W_KING
START_W_KNIGHT
START_W_PAWN
START_W_QUEEN
START_W_ROOK
TEST_FENS
TOTAL_CASTLING_CNT
WEST
WHITE_SIDE

Functions

bb_to_sq
copy_occ_bbs
copy_piece_bbs
file_bb
file_idx_of_sq
file_of_sq
make_sq
other_player

Returns the other player.

parse_sq
pawn_push
print_bitboard
print_u64
rank_bb
rank_idx_of_sq
rank_of_sq
relative_rank
relative_rank_of_sq
relative_square

Returns the relative square from a given square.

return_start_bb
reverse_byte
reverse_bytes
sq_is_okay
sq_to_bb
value_of_piece

Returns the relative value of a piece.

Type Definitions

BitBoard

BitBoard is a u64, where the bits of each index represent a square.

SQ

Alias for a certain square number.