Struct shakmaty::Castles [−][src]
pub struct Castles { /* fields omitted */ }
Expand description
Castling paths and unmoved rooks.
Implementations
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));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Castles
impl UnwindSafe for Castles
Blanket Implementations
Mutably borrows from an owned value. Read more