Struct pleco::helper::Helper[][src]

pub struct Helper {}

Helper structure for accessing statically-initialized tables and other constants.

Guarantees that the tables will be initialized upon access through a Helper.

Methods

impl Helper
[src]

Creates a new Helper Object, automatically initializing all the needed tables.

Calling this method multiple times does not waste time computing the static variables if already initialized. init_statics also does the same thing as well.

Important traits for BitBoard

Generate Bishop Moves BitBoard from a bishop square and all occupied squares on the board. This function will return captures to pieces on both sides. The resulting BitBoard must be AND'd with the inverse of the intending moving player's pieces.

Important traits for BitBoard

Generate Rook Moves BitBoard from a bishop square and all occupied squares on the board. This function will return captures to pieces on both sides. The resulting BitBoard must be AND'd with the inverse of the intending moving player's pieces.

Important traits for BitBoard

Generate Queen Moves BitBoard from a bishop square and all occupied squares on the board. This function will return captures to pieces on both sides. The resulting BitBoard must be AND'd with the inverse of the intending moving player's pieces.

Important traits for BitBoard

Generate Knight Moves BitBoard from a source square.

Important traits for BitBoard

Generate King moves BitBoard from a source square.

Get the distance of two squares.

Important traits for BitBoard

Get the line (diagonal / file / rank) BitBoard that two squares both exist on, if it exists.

Important traits for BitBoard

Get the line (diagonal / file / rank) BitBoard between two squares, not including the squares, if it exists.

Important traits for BitBoard

Gets the adjacent files BitBoard of the square

Important traits for BitBoard

Gets the adjacent files BitBoard of the file

Important traits for BitBoard

Pawn attacks BitBoard from a given square, per player. Basically, given square x, returns the BitBoard of squares a pawn on x attacks.

Returns if three Squares are in the same diagonal, file, or rank.

Important traits for BitBoard

Returns the ring of bits surrounding the square sq at a specified distance.

Safety

distance must be less than 8, or else a panic will occur.

Important traits for BitBoard

Returns the BitBoard of all squares in the rank in front of the given one.

Important traits for BitBoard

Returns the BitBoard of all squares that can be attacked by a pawn of the same color when it moves along its file, starting from the given square. Basically, if the pawn progresses along the same file for the entire game, this bitboard would contain all possible forward squares it could attack

Safety

The Square must be within normal bounds, or else a panic or undefined behvaior may occur.

Important traits for BitBoard

Returns the BitBoard of all squares in the file in front of the given one.

Safety

The Square must be within normal bounds, or else a panic or undefined behvaior may occur.

Important traits for BitBoard

Returns a BitBoard allowing for testing of the a pawn being a "passed pawn".

Safety

The Square must be within normal bounds, or else a panic or undefined behvaior may occur.

Returns the zobrist hash of a specific player's piece being at a particular square.

Returns the zobrist hash of a given file having an en-passant square.

Returns a zobrast hash of the castling rights, as defined by the Board.

Returns Zobrist Hash of flipping sides.

Returns the score for a player's piece being at a particular square.

Returns the value of a piece for a player. If eg is true, it returns the end game value. Otherwise, it'll return the midgame value.

Trait Implementations

impl Copy for Helper
[src]

impl Clone for Helper
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Send for Helper
[src]

impl Sync for Helper
[src]

impl Default for Helper
[src]

Returns the "default value" for a type. Read more