Struct pleco::core::bitboard::BitBoard [] [src]

pub struct BitBoard(pub u64);

Defines an object to define a bitboard. a BitBoard is simply a u64 where each bit maps to a specific square. Used for mapping occupancy, where '1' represents a piece being at that index's square, and a '0' represents a lack of a piece.

Methods

impl BitBoard
[src]

FILE_A: BitBoard = BitBoard(FILE_A)

FILE_B: BitBoard = BitBoard(FILE_B)

FILE_C: BitBoard = BitBoard(FILE_C)

FILE_D: BitBoard = BitBoard(FILE_D)

FILE_E: BitBoard = BitBoard(FILE_E)

FILE_F: BitBoard = BitBoard(FILE_F)

FILE_G: BitBoard = BitBoard(FILE_G)

FILE_H: BitBoard = BitBoard(FILE_H)

RANK_1: BitBoard = BitBoard(RANK_1)

RANK_2: BitBoard = BitBoard(RANK_2)

RANK_3: BitBoard = BitBoard(RANK_3)

RANK_4: BitBoard = BitBoard(RANK_4)

RANK_5: BitBoard = BitBoard(RANK_5)

RANK_6: BitBoard = BitBoard(RANK_6)

RANK_7: BitBoard = BitBoard(RANK_7)

RANK_8: BitBoard = BitBoard(RANK_8)

[src]

Converts a BitBoard to a square.

Safety

The BitBoard must have exactly one bit inside of it, or else this will return the square of the least significant bit.

[src]

Returns the number of bits in a BitBoard

[src]

Returns the SQ of the least significant bit.

Panic

Will panic if the BitBoard is empty.

[src]

Returns the index (u8) of the least significant bit.

Panic

Will panic if the BitBoard is empty.

[src]

Returns if there are more than 1 bits inside.

[src]

Determines if the BitBoard is empty (contains no bits).

[src]

Determines if the BitBoard is not empty (contains one or more bits).

[src]

Returns the least significant bit as a BitBoard.

[src]

Returns the least significant bit as a u64.

[src]

Array containing all the BitBoards for of the starting position, for each player and piece.

[src]

Returns a clone of a [[BitBoard; 6]; 2]. Used to duplicate occupancy BitBoards of each piece for each player.

[src]

Returns a clone of a [BitBoard; 2]. Used to duplicate occupancy BitBoards of each player.

Trait Implementations

impl Copy for BitBoard
[src]

impl Clone for BitBoard
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for BitBoard
[src]

[src]

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

impl Hash for BitBoard
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for BitBoard
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for BitBoard
[src]

impl Debug for BitBoard
[src]

[src]

Formats the value using the given formatter.

impl From<u64> for BitBoard
[src]

[src]

Performs the conversion.

impl Rem for BitBoard
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl RemAssign for BitBoard
[src]

[src]

Performs the %= operation.

impl BitOr for BitBoard
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl BitOrAssign for BitBoard
[src]

[src]

Performs the |= operation.

impl BitAnd for BitBoard
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl BitAndAssign for BitBoard
[src]

[src]

Performs the &= operation.

impl BitXor for BitBoard
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl BitXorAssign for BitBoard
[src]

[src]

Performs the ^= operation.

impl Add for BitBoard
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl AddAssign for BitBoard
[src]

[src]

Performs the += operation.

impl Div for BitBoard
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl DivAssign for BitBoard
[src]

[src]

Performs the /= operation.

impl Mul for BitBoard
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl MulAssign for BitBoard
[src]

[src]

Performs the *= operation.

impl Sub for BitBoard
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl SubAssign for BitBoard
[src]

[src]

Performs the -= operation.

impl Shl<usize> for BitBoard
[src]

The resulting type after applying the << operator.

[src]

Performs the << operation.

impl ShlAssign<usize> for BitBoard
[src]

[src]

Performs the <<= operation.

impl Shr<usize> for BitBoard
[src]

The resulting type after applying the >> operator.

[src]

Performs the >> operation.

impl ShrAssign<usize> for BitBoard
[src]

[src]

Performs the >>= operation.

impl Not for BitBoard
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl Display for BitBoard
[src]

[src]

Formats the value using the given formatter. Read more