Struct sudoku::Sudoku [] [src]

pub struct Sudoku {
    pub order: u8,
    pub elements: Vec<Option<Element>>,
}

A (partial) grid of elements.

Fields

The order of this sudoku.

The elements composing this sudoku.

Methods

impl Sudoku
[src]

[src]

Constructs a new sudoku of the specified order.

This method reserves space in memory for the puzzle's elements.

Notes

This method does not generate a valid, uniquely solvable sudoku. If you wish to generate such a sudoku (which you likely do), use Sudoku::generate.

[src]

Returns whether the puzzle is completely full of values.

[src]

Returns the relevant groups for checking a given element in the grid.

The number of groups is always equal to the number of dimensions plus one.

[src]

Places the specified value (or lack thereof) at the specified index, returning an owned copy.

Trait Implementations

impl Generate for Sudoku
[src]

[src]

Generates a puzzle of the desired order and difficulty.

impl Clone for Sudoku
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Sudoku
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Sudoku
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Grid for Sudoku
[src]

[src]

Returns all points in the grid. Read more

impl Index<Point> for Sudoku
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Puzzle for Sudoku
[src]

[src]

The order of the puzzle.

impl Solve for Sudoku
[src]

[src]

Returns the puzzle's unique solution if it exists.

[src]

Whether the puzzle has a unique solution.

impl Score for Sudoku
[src]

[src]

The raw difficulty score of this puzzle.

[src]

The graded difficulty score of this puzzle.

impl Display for Sudoku
[src]

[src]

Formats the value using the given formatter. Read more

impl FromStr for Sudoku
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Sudoku

impl Sync for Sudoku