pub struct LinearGame {
pub states: Vec<State>,
pub state_ptr: usize,
pub nodes: usize,
}Expand description
LinearGame represents a single variantion chess game
Fields§
§states: Vec<State>§state_ptr: usize§nodes: usizeImplementations§
Source§impl LinearGame
LinearGame implementation
impl LinearGame
LinearGame implementation
Sourcepub fn new() -> LinearGame
pub fn new() -> LinearGame
returns a new empty LinearGame
Sourcepub fn pretty_print_string(&mut self) -> String
pub fn pretty_print_string(&mut self) -> String
returns the game as pretty printable string
Sourcepub fn push_by_index(&mut self, index: usize) -> bool
pub fn push_by_index(&mut self, index: usize) -> bool
pushes a move by index in state move buff
pub fn perft_rec(&mut self, depth: usize)
pub fn perft(&mut self, depth: usize) -> (usize, f32, f32)
Auto Trait Implementations§
impl Freeze for LinearGame
impl RefUnwindSafe for LinearGame
impl Send for LinearGame
impl Sync for LinearGame
impl Unpin for LinearGame
impl UnsafeUnpin for LinearGame
impl UnwindSafe for LinearGame
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