Struct gobblet::Board

source ·
pub struct Board { /* private fields */ }
Expand description

A representation of a Gobblet board.

Implementations§

Returns a bitboard with only the given piece.

Returns a bitboard viewed from above with only the given color. If a piece of a different color is stacked on top, the bit will be 0.

Returns a bitboard viewed from above.

Checks if any piece exists on the given square.

Places a piece to the given square and returns the new board.

Moves a piece from one square to another and returns the new board.

Checks if a piece can be placed on the given square.

Checks if a piece can be moved to the given square.

Checks if a player of the given color has won the game.

Returns the top piece on the given square, or None if there is no piece.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
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
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§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.