[][src]Module rustenginelib::square

Structs

MagicInfo

MagicInfo records the magic and shift for a square

Enums

Delta

Delta enum lists the possible deltas of chess pieces

MoveGenMode

MoveGenNode lists the move generation modes

Statics

BISHOP_ATTACK

BISHOP_ATTACK is the attack table of bishop

BISHOP_MAGIC_ATTACK

BISHOP_MAGIC_ATTACK is the magic attack table of bishop

KING_AREA

KING_AREA is the attack table of king plus king square

KING_ATTACK

KING_ATTACK is the attack table of king

KNIGHT_ATTACK

KNIGHT_ATTACK is the attack table of knight

MAGIC_LOOKUP_BISHOP

MAGIC_LOOKUP_BISHOP is the magic lookup table for bishop

MAGIC_LOOKUP_ROOK

MAGIC_LOOKUP_ROOK is the magic lookup table for rook

QUEEN_ATTACK

QUEEN_ATTACK is the attack table of queen

ROOK_ATTACK

ROOK_ATTACK is the attack table of rook

ROOK_MAGIC_ATTACK

ROOK_MAGIC_ATTACK is the magic attack table of rook

Traits

DeltaBuffer

DeltaBuffer trait adds methods to various size buffers that hold deltas

SquareTrait

Square trait adds methods to a Square

Functions

bishop_mobility

returns bishop mobility

create_magic_lookup_table

create magic lookup table

detect_collision

detects collision of a magic applied to a mobility, returns true if there is a collision, false otherwise

find_and_log_magics

find and log all magics

find_magic_and_shift

tries to find magic and shift in certain number of tries per shift for a mobility, starting from a maximum shift, going to minimum shift, returns a tuple of the found magic and a bool indicating success

find_magic_for_shift

tries to find magic for shift in certain number of tries for a mobility, returns a tuple of the found magic and a bool indicating success

get_sliding_mobility

returns sliding mobility

jump_attack

returns jump attack bitboard from deltas

log_find_magic_and_shift

find and log magic and shift

magic_attack

return magic attack for an attack

mobility_index

returns index of mobility in mobility table for a magic and shift

new_magic

returns a random magic

queen_mobility

returns queen mobility

rank_file

constructs a Square from rank and file

rook_mobility

returns rook mobility

sliding_attack

returns sliding attack bitboard from deltas

total_magic_space

returns the total number of magic look up table items

translate_mask_to_occupancy

translates an occupancy mask to partial occupancy of a mobility

Type Definitions

AttackTable

AttackTable type records an attack bitboard for every square of a chess board

File

Rank type represents the file of a square as an unsigned int

Rank

Rank type represents the rank of a square as an unsigned int

Square

Square type represents a square of a chess board as an unsigned int