Module pleco::core::masks[][src]

Masks and various other constants.

Constants

ALL_CASTLING_RIGHTS

Total number of castling rights for both players.

BLACK_KING_START

Starting square number of the black king.

BLACK_SIDE

Bit representation of the black player's side of the board.

CASTLING_PATH

Array for the bits representing the castling path for castle, indexed per the side available (king-side, queen-side), as well as indexed per player.

CASTLING_PATH_BLACK

Array for the bits representing the castling path for a white castle, indexed per the side available (king-side, queen-side).

CASTLING_PATH_BLACK_K_SIDE

Bits representing the castling path for a black king-side castle.

CASTLING_PATH_BLACK_Q_SIDE

Bits representing the castling path for a black queen-side castle.

CASTLING_PATH_WHITE

Array for the bits representing the castling path for a white castle, indexed per the side available (king-side, queen-side).

CASTLING_PATH_WHITE_K_SIDE

Bits representing the castling path for a white king-side castle.

CASTLING_PATH_WHITE_Q_SIDE

Bits representing the castling path for a white queen-side castle.

CASTLING_ROOK_START

Array containing all the starting rook positions for each side, for each player.

CASTLING_SIDES

The total number of types of castling a player can perform: king side and queen side.

C_BLACK_K_MASK

Castling right bit representing the black king-side castle is still possible.

C_BLACK_Q_MASK

Castling right bit representing the black queen-side castle is still possible.

C_WHITE_K_MASK

Castling right bit representing the white king-side castle is still possible.

C_WHITE_Q_MASK

Castling right bit representing the white queen-side castle is still possible.

DARK_SQUARES

Bit representation of rank dark squares.

EAST

Direction of going east on a chessboard.

FILE_A

Bit representation of file A.

FILE_B

Bit representation of file B.

FILE_C

Bit representation of file C.

FILE_CNT

The total number of files on a chessboard.

FILE_D

Bit representation of file D.

FILE_DISPLAYS

Characters for each file, index from file A to file H.

FILE_E

Bit representation of file E.

FILE_F

Bit representation of file F.

FILE_G

Bit representation of file H.

FILE_H

Bit representation of file G.

LIGHT_SQUARES

Bit representation of all light squares.

NORTH

Direction of going north on a chessboard.

NORTH_EAST

Direction of going northeast on a chessboard.

NORTH_WEST

Direction of going northwest on a chessboard.

PHASE_CNT

The total number of game phases, being middle and end game

PIECE_CNT

The total number of types of pieces & player combinations on a chessboard.

PIECE_DISPLAYS

Characters for each combination of player and piece.

PIECE_TYPE_CNT

The total number of types of pieces on a chessboard.

PLAYER_CNT

The total number of players on a chessboard.

RANK_1

Bit representation of rank 1.

RANK_2

Bit representation of rank 2.

RANK_3

Bit representation of rank 3.

RANK_4

Bit representation of rank 4.

RANK_5

Bit representation of rank 5.

RANK_6

Bit representation of rank 6.

RANK_7

Bit representation of rank 7.

RANK_8

Bit representation of rank 8.

RANK_CNT

The total number of ranks on a chessboard.

RANK_DISPLAYS

Characters for each rank, index from rank 1 to rank 8.

ROOK_BLACK_KSIDE_START

Starting square number of the black king-side rook.

ROOK_BLACK_QSIDE_START

Starting square number of the black queen-side rook.

ROOK_WHITE_KSIDE_START

Starting square number of the white king-side rook.

ROOK_WHITE_QSIDE_START

Starting square number of the white queen-side rook.

SOUTH

Direction of going south on a chessboard.

SOUTH_EAST

Direction of going southeast on a chessboard.

SOUTH_WEST

Direction of going southwest on a chessboard.

SQ_CNT

The total number of squares on a chessboard.

SQ_DISPLAY_ORDER

Display order for a squares. Used for printing, and for answering the question of which square to print first.

START_BLACK_OCC

Bits for the starting occupancy board for the black player.

START_B_BISHOP

Bits for starting occupancy boards for a black bishop.

START_B_KING

Bits for starting occupancy boards for a black king.

START_B_KNIGHT

Bits for starting occupancy boards for a black knight.

START_B_PAWN

Bits for starting occupancy boards for a black pawn.

START_B_QUEEN

Bits for starting occupancy boards for a black queen.

START_B_ROOK

Bits for starting occupancy boards for a black rook.

START_OCC_ALL

Bits for the starting occupancy board for both players.

START_OCC_BOARDS

Array for starting occupancy boards for both players.

START_WHITE_OCC

Bits for the starting occupancy board for the white player.

START_W_BISHOP

Array for starting occupancy boards for a white bishop.

START_W_KING

Bits for starting occupancy boards for a white king.

START_W_KNIGHT

Bits for starting occupancy boards for a white knight.

START_W_PAWN

Bits for starting occupancy boards for a white pawn.

START_W_QUEEN

Bits for starting occupancy boards for a white queen.

START_W_ROOK

Bits for starting occupancy boards for a white rook.

TOTAL_CASTLING_CNT

The total number of types of castling rights available for a chessboard, concerning a singular player. eg, a player either has 1) both K side and Q side castling possible, 2) K side castling possible, 3) Q side castling possible, or 4) no castling possible.

WEST

Direction of going west on a chessboard.

WHITE_KING_START

Starting square number of the white king.

WHITE_SIDE

Bit representation of the White player's side of the board.

Statics

FILE_BB

Array of all files and their corresponding bits, indexed from file A to file H.

RANK_BB

Array of all ranks and their corresponding bits, indexed from rank 1 to rank 8.