|
@@ -203,7 +203,7 @@ mod tests {
|
|
|
|
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let mut board = AnyBoard::new(size);
|
|
let mut board = AnyBoard::new(size);
|
|
- let load = board.load_from_tld('b', '_', &result.puzzle);
|
|
|
|
|
|
+ let load = board.load_ksudoku(&result.puzzle);
|
|
assert!(load.is_ok());
|
|
assert!(load.is_ok());
|
|
|
|
|
|
// Ok, puzzle is loaded!
|
|
// Ok, puzzle is loaded!
|
|
@@ -234,7 +234,7 @@ mod tests {
|
|
|
|
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let mut board = AnyBoard::new(size);
|
|
let mut board = AnyBoard::new(size);
|
|
- let load = board.load_from_tld('b', '_', &result.puzzle);
|
|
|
|
|
|
+ let load = board.load_ksudoku(&result.puzzle);
|
|
assert!(load.is_ok());
|
|
assert!(load.is_ok());
|
|
|
|
|
|
// Ok, puzzle is loaded!
|
|
// Ok, puzzle is loaded!
|
|
@@ -273,7 +273,7 @@ mod tests {
|
|
|
|
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let mut board = AnyBoard::new(size);
|
|
let mut board = AnyBoard::new(size);
|
|
- let load = board.load_from_tld('b', '_', &result.puzzle);
|
|
|
|
|
|
+ let load = board.load_ksudoku(&result.puzzle);
|
|
assert!(load.is_ok());
|
|
assert!(load.is_ok());
|
|
|
|
|
|
// Ok, puzzle is loaded!
|
|
// Ok, puzzle is loaded!
|
|
@@ -324,9 +324,9 @@ mod tests {
|
|
|
|
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let mut board = AnyBoard::new(size);
|
|
let mut board = AnyBoard::new(size);
|
|
- let load = board.load_from_tld('b', '_', &result.puzzle);
|
|
|
|
|
|
+ let load = board.load_ksudoku(&result.puzzle);
|
|
let mut solution = AnyBoard::new(size);
|
|
let mut solution = AnyBoard::new(size);
|
|
- let solution_load = solution.load_from_tld('b', '_', &result.solution);
|
|
|
|
|
|
+ let solution_load = solution.load_ksudoku(&result.solution);
|
|
assert!(load.is_ok());
|
|
assert!(load.is_ok());
|
|
assert!(solution_load.is_ok());
|
|
assert!(solution_load.is_ok());
|
|
|
|
|
|
@@ -379,10 +379,10 @@ mod tests {
|
|
|
|
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let mut board = AnyBoard::new(size);
|
|
let mut board = AnyBoard::new(size);
|
|
- let load = board.load_from_tld('b', '_', &result.puzzle);
|
|
|
|
|
|
+ let load = board.load_ksudoku(&result.puzzle);
|
|
assert!(load.is_ok());
|
|
assert!(load.is_ok());
|
|
let mut solution = AnyBoard::new(size);
|
|
let mut solution = AnyBoard::new(size);
|
|
- let solution_load = solution.load_from_tld('b', '_', &result.solution);
|
|
|
|
|
|
+ let solution_load = solution.load_ksudoku(&result.solution);
|
|
assert!(solution_load.is_ok());
|
|
assert!(solution_load.is_ok());
|
|
|
|
|
|
// Ok, puzzle is loaded!
|
|
// Ok, puzzle is loaded!
|
|
@@ -448,10 +448,10 @@ mod tests {
|
|
|
|
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let size = (result.order as f64).sqrt() as u8;
|
|
let mut board = AnyBoard::new(size);
|
|
let mut board = AnyBoard::new(size);
|
|
- let load = board.load_from_tld('b', '_', &result.puzzle);
|
|
|
|
|
|
+ let load = board.load_ksudoku(&result.puzzle);
|
|
assert!(load.is_ok());
|
|
assert!(load.is_ok());
|
|
let mut solution = AnyBoard::new(size);
|
|
let mut solution = AnyBoard::new(size);
|
|
- let solution_load = solution.load_from_tld('b', '_', &result.solution);
|
|
|
|
|
|
+ let solution_load = solution.load_ksudoku(&result.solution);
|
|
assert!(solution_load.is_ok());
|
|
assert!(solution_load.is_ok());
|
|
|
|
|
|
// Ok, puzzle is loaded!
|
|
// Ok, puzzle is loaded!
|
|
@@ -524,6 +524,6 @@ mod tests {
|
|
let mut solver = AnySolver::new_from(&board);
|
|
let mut solver = AnySolver::new_from(&board);
|
|
assert!(solver.solve_logic());
|
|
assert!(solver.solve_logic());
|
|
assert_eq!(solver.board, solution);
|
|
assert_eq!(solver.board, solution);
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|