pub struct Game {
pub taking_all: [u64; 4],
pub taking: Vec<u8>,
pub breaking: Vec<u8>,
}Fields§
§taking_all: [u64; 4]§taking: Vec<u8>§breaking: Vec<u8>Implementations§
Source§impl Game
impl Game
pub fn from_ascii(s: &[u8]) -> Option<Game>
pub fn can_take_all(&self, n: usize) -> bool
pub fn breaking_moves( &self, n: usize, ) -> BreakingMoveIterator<Copied<Iter<'_, u8>>> ⓘ
Sourcepub fn to_ascii(&self, separator: u8) -> Vec<u8> ⓘ
pub fn to_ascii(&self, separator: u8) -> Vec<u8> ⓘ
Returns rules as an ascii string, using given decimal separator (for example b'.').
Sourcepub fn taking_iters(&self, position: usize) -> usize
pub fn taking_iters(&self, position: usize) -> usize
Returns the total number of taking iterations needed (by any of the methods: naive, RC or RC2) to calculate the nimbers of all positions up to and including the one given.
Sourcepub fn breaking_naive_iters(&self, position: usize) -> usize
pub fn breaking_naive_iters(&self, position: usize) -> usize
Returns the total number of breaking iterations needed by the naive method to calculate the nimbers of all positions up to and including the one specified.
Sourcepub fn naive_iters(&self, position: usize) -> usize
pub fn naive_iters(&self, position: usize) -> usize
Returns the total number of iterations needed by the naive method to calculate the nimbers of all positions up to and including the one specified.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Game
impl RefUnwindSafe for Game
impl Send for Game
impl Sync for Game
impl Unpin for Game
impl UnwindSafe for Game
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