You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
481 B
29 lines
481 B
|
|
use crate::board::Board;
|
|
|
|
pub trait Solver {
|
|
|
|
/**
|
|
* Finds one solution for the board.
|
|
*/
|
|
fn solve(&self, _: &Board) -> Option<Board>;
|
|
|
|
/**
|
|
* Calculates if there are multiple solutions for the board.
|
|
*/
|
|
fn is_unique(&self, _ : &Board) -> bool;
|
|
|
|
}
|
|
|
|
pub enum SodokuComplexity {
|
|
Trivial,
|
|
Easy,
|
|
Average,
|
|
Hard,
|
|
Difficult,
|
|
Impossibru
|
|
}
|
|
|
|
pub trait Generator{
|
|
fn generate(&self, _complexity:SodokuComplexity) -> Board;
|
|
} |