pub struct Game { /* private fields */ }
Expand description
A game layout, consisting of the chosen verifiers.
Implementations§
Source§impl Game
impl Game
pub fn starting_state(&self) -> State<'_>
pub fn verfier(&self, index: u8) -> &Verifier
pub fn verifier_count(&self) -> usize
pub fn verifier_options_for_assignment<'a, 'b: 'a>( &'a self, assignment: &'b Assignment, ) -> impl Iterator<Item = VerifierOption> + 'a
pub fn new_from_verifiers(verifiers: Vec<Verifier>) -> Game
pub fn new_from_verifier_numbers( verifier_numbers: impl Iterator<Item = usize>, ) -> Game
Sourcepub fn all_assignments(&self) -> impl Iterator<Item = Assignment> + '_
pub fn all_assignments(&self) -> impl Iterator<Item = Assignment> + '_
Get all assignments, regardless of their validity.
Sourcepub fn possible_codes_for_assignment(&self, assignment: &Assignment) -> Set
pub fn possible_codes_for_assignment(&self, assignment: &Assignment) -> Set
Get all codes that adhere to a particular assignment.
pub fn print_assigment(&self, assignment: &Assignment)
Sourcepub fn is_possible_solution(&self, assignment: &Assignment) -> bool
pub fn is_possible_solution(&self, assignment: &Assignment) -> bool
Check if the assignment is a possible puzzle solution. This means that there should be a single code that adheres to the verifiers, and that none of the verifiers are redundant.
Sourcepub fn possible_solutions(&self) -> Set
pub fn possible_solutions(&self) -> Set
Get all possible solutions, i.e. those codes that correspond to a verifier result that have exactly one solution.
Trait Implementations§
impl Eq for Game
impl StructuralPartialEq for Game
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