pub enum GameState {
PlaceState(PlaceState),
PlayState(PlayState),
}Variants§
PlaceState(PlaceState)
PlayState(PlayState)
Implementations§
Source§impl GameState
impl GameState
pub fn new( p1_turn_to_move: bool, move_number: usize, piece_board: PieceBoard, ) -> Self
pub fn initial() -> Self
pub fn take_action(&self, action: &Action) -> Self
pub fn is_terminal(&self) -> Option<Value>
pub fn valid_actions(&self) -> Vec<Action>
pub fn valid_actions_no_exclusions(&self) -> Vec<Action>
pub fn get_piece_board(&self) -> &PieceBoard
pub fn is_p1_turn_to_move(&self) -> bool
pub fn get_move_number(&self) -> usize
pub fn valid_actions_(&self, check_repetitions: bool) -> Vec<Action>
pub fn hash(&self) -> Zobrist
Sourcepub fn step(&self) -> usize
pub fn step(&self) -> usize
Gets the current step number during the play phase. Note that the step number is 0 based. So values are always in the range 0..=3
pub fn is_play_phase(&self) -> bool
pub fn get_banned_piece_mask(&self) -> u64
pub fn get_vertical_symmetry(&self) -> Self
pub fn get_trapped_animal_for_move( &self, square: Square, direction: Direction, ) -> Option<(Square, Piece, bool)>
pub fn piece_to_place(&self) -> Piece
Trait Implementations§
impl Eq for GameState
Auto Trait Implementations§
impl Freeze for GameState
impl RefUnwindSafe for GameState
impl Send for GameState
impl Sync for GameState
impl Unpin for GameState
impl UnsafeUnpin for GameState
impl UnwindSafe for GameState
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