Struct shakmaty::Castles[][src]

pub struct Castles { /* fields omitted */ }

Castling paths and unmoved rooks.

Methods

impl Castles
[src]

Important traits for Bitboard

Gets the squares that need to be empty so that castling is possible on the given side.

Examples

use shakmaty::{Castles, CastlingSide, Bitboard, Color, Square};

let castles = Castles::default();
let path = castles.path(Color::White, CastlingSide::QueenSide);
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// 0 1 1 1 0 . . .

assert_eq!(path, Bitboard::from(Square::B1) | Bitboard::from(Square::C1) | Bitboard::from(Square::D1));

Important traits for Bitboard

Trait Implementations

impl Clone for Castles
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Castles
[src]

Formats the value using the given formatter. Read more

impl Default for Castles
[src]

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

Auto Trait Implementations

impl Send for Castles

impl Sync for Castles