Struct pleco::board::piece_locations::PieceLocations[][src]

pub struct PieceLocations { /* fields omitted */ }

Struct to allow fast lookups for any square. Given a square, allows for determining if there is a piece currently there, and if so, allows for determining it's color and type of piece.

Piece Locations is a BLIND structure, Providing a function of |sq| -> |Piece AND/OR Player| The reverse cannot be done Looking up squares from a piece / player.

Methods

impl PieceLocations
[src]

Constructs a new PieceLocations with a default of no pieces on the board.

Places a given piece for a given player at a certain square.

Panics

Panics if Square is of index higher than 63.

Removes a Square.

Panics

Panics if Square is of index higher than 63.

Returns the Piece at a SQ, Or None if the square is empty.

Panics

Panics if square is of index higher than 63.

Returns if a square is occupied.

Returns the first square (if any) that a piece / player is at.

Returns if the Board contains a particular piece / player.

Trait Implementations

impl Clone for PieceLocations
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for PieceLocations
[src]

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

This method tests for !=.

impl IntoIterator for PieceLocations
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations