pub struct Board { /* private fields */ }
Expand description
Piece
positions on a board.
Examples
use shakmaty::{Square, Board, Color::Black};
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()));
Implementations
Mirror the board vertically. See Bitboard::flip_vertical
.
Mirror the board horizontally. See Bitboard::flip_horizontal
.
Mirror the board at the a1-h8 diagonal.
See Bitboard::flip_diagonal
.
Mirror the board at the h1-a8 diagonal.
See Bitboard::flip_anti_diagonal
.
Rotate the board 90 degrees clockwise. See Bitboard::rotate_90
.
Rotate the board 180 degrees. See Bitboard::rotate_180
.
Rotate the board 270 degrees clockwise. See Bitboard::rotate_270
.
Trait Implementations
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
type Err = ParseFenError
type Err = ParseFenError
The associated error which can be returned from parsing.
Auto Trait Implementations
impl RefUnwindSafe for Board
impl UnwindSafe for Board
Blanket Implementations
Mutably borrows from an owned value. Read more