Struct shakmaty::Board [] [src]

pub struct Board { /* fields omitted */ }

Piece positions on a board.

Examples

let board = Board::new();
// r n b q k b n r
// p p p p p p p p
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// P P P P P P P P
// R N B Q K B N R

assert_eq!(board.piece_at(Square::E8), Some(Black.king()));

Methods

impl Board
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Bishops, rooks and queens.

[src]

Pawns, knights and kings.

[src]

[src]

[src]

The (unique, unpromoted) king of the given side.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Clone for Board
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Board
[src]

impl PartialEq for Board
[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 Default for Board
[src]

[src]

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

impl Debug for Board
[src]

[src]

Formats the value using the given formatter.

impl Extend<(Square, Piece)> for Board
[src]

[src]

Extends a collection with the contents of an iterator. Read more

impl FromIterator<(Square, Piece)> for Board
[src]

[src]

Creates a value from an iterator. Read more

impl FromStr for Board
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl Display for Board
[src]

[src]

Formats the value using the given formatter. Read more