pub struct PieceBoard {
pub p1_pieces: u64,
pub all_pieces: u64,
pub elephants: u64,
pub camels: u64,
pub horses: u64,
pub dogs: u64,
pub cats: u64,
pub rabbits: u64,
}Fields§
§p1_pieces: u64§all_pieces: u64§elephants: u64§camels: u64§horses: u64§dogs: u64§cats: u64§rabbits: u64Implementations§
Source§impl PieceBoard
impl PieceBoard
pub fn initial() -> Self
pub fn new( p1_pieces: u64, elephants: u64, camels: u64, horses: u64, dogs: u64, cats: u64, rabbits: u64, ) -> Self
pub fn get_bits_for_piece(&self, piece: Piece, p1_pieces: bool) -> u64
pub fn get_player_piece_mask(&self, p1_pieces: bool) -> u64
pub fn get_bits_by_piece_type(&self, piece: Piece) -> u64
pub fn bits_by_piece_type_mut(&mut self, piece: Piece) -> &mut u64
pub fn get_trapped_piece_bits(&self) -> u64
pub fn get_piece_type_at_square(&self, square: &Square) -> Option<Piece>
pub fn get_curr_player_frozen_pieces(&self, p1_turn_to_move: bool) -> u64
pub fn get_curr_player_non_frozen_pieces(&self, p1_turn_to_move: bool) -> u64
pub fn get_curr_player_piece_mask(&self, p1_turn_to_move: bool) -> u64
pub fn get_opponent_piece_mask(&self, p1_turn_to_move: bool) -> u64
pub fn push_pull_piece( &mut self, square: Square, direction: PushPullDirection, ) -> bool
pub fn move_piece_on_path(&mut self, square: Square, path: Path) -> bool
pub fn move_piece_update_board(&mut self, square: Square, direction: Direction)
pub fn move_piece(&mut self, square: Square, direction: Direction) -> bool
pub fn remove_trapped_pieces(&mut self) -> bool
pub fn get_vertical_symmetry(&self) -> Self
pub fn place(&mut self, piece: Piece, square: Square, p1_piece: bool)
pub fn fill(&mut self, piece: Piece, mask: u64, p1_piece: bool)
pub fn empty_placements(&self, p1_placements: bool) -> u64
Trait Implementations§
Source§impl Clone for PieceBoard
impl Clone for PieceBoard
Source§impl Debug for PieceBoard
impl Debug for PieceBoard
Auto Trait Implementations§
impl Freeze for PieceBoard
impl RefUnwindSafe for PieceBoard
impl Send for PieceBoard
impl Sync for PieceBoard
impl Unpin for PieceBoard
impl UnsafeUnpin for PieceBoard
impl UnwindSafe for PieceBoard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more