semi-functionning console interface
All checks were successful
Linux arm64 / Build (push) Successful in 38s
All checks were successful
Linux arm64 / Build (push) Successful in 38s
This commit is contained in:
@@ -3,10 +3,7 @@
|
||||
*/
|
||||
package sudoku;
|
||||
|
||||
import sudoku.io.SudokuPrinter;
|
||||
import sudoku.structure.SudokuFactory;
|
||||
|
||||
import java.util.Arrays;
|
||||
import sudoku.io.ConsoleInterface;
|
||||
|
||||
public class Main {
|
||||
public String getGreeting() {
|
||||
@@ -14,33 +11,7 @@ public class Main {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new Main().getGreeting());
|
||||
|
||||
int blockWidth = 2;
|
||||
int blockHeight = 2;
|
||||
var multidoku = SudokuFactory.createBasicEmptyRectangleDoku(blockWidth, blockHeight,
|
||||
SudokuFactory.DEFAULT_CONSTRAINTS);
|
||||
var sudoku = multidoku.getSubGrid(0);
|
||||
if (!sudoku.setCellsSymbol(Arrays.asList(0, 1, 2, 3, 2, 3, 1, 1, 1, 0, 3, 2, 3, 2, 1, 1))) {
|
||||
System.out.println("At least one of those values does not respect the constraints.");
|
||||
}
|
||||
|
||||
// sudoku.setCellSymbol(8,3,0);
|
||||
|
||||
SudokuPrinter.printRectangleSudoku(multidoku.getSubGrid(0), blockWidth, blockHeight);
|
||||
|
||||
/*
|
||||
* Solver solver = new Solver();
|
||||
* ArrayList<IConstraint> constraints = new ArrayList<>();
|
||||
* constraints.add(new LineConstraint());
|
||||
* constraints.add(new ColumnConstraint());
|
||||
* constraints.add(new BlockConstraint());
|
||||
* try {
|
||||
* solver.solve(multidoku, constraints);
|
||||
* } catch (Exception e) {
|
||||
* System.out.println(e);
|
||||
* }
|
||||
*/
|
||||
|
||||
ConsoleInterface console = new ConsoleInterface();
|
||||
console.start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user