/*
 * This Java source file was generated by the Gradle 'init' task.
 */
package sudoku;

import gui.RenderableMultidoku;
import gui.constants.Symbols;
import sudoku.io.ConsoleInterface;
import sudoku.io.SudokuPrinter;
import sudoku.io.SudokuSerializer;
import sudoku.solver.RandomSolver;
import sudoku.structure.MultiDoku;
import sudoku.structure.SudokuFactory;

public class Main {
    public String getGreeting() {
        return "Hello World!";
    }

    public static void voidTest(){
        MultiDoku md = SudokuFactory.createBasicXShapedMultidoku(3, SudokuFactory.DEFAULT_CONSTRAINTS);
        SudokuPrinter.printMultiDoku(RenderableMultidoku.fromMultidoku(md), Symbols.Numbers, 3, 3);
        SudokuSerializer.saveMultiDoku(md);
    }

    public static void filledTest(){
        MultiDoku md = SudokuFactory.createBasicXShapedMultidoku(3, SudokuFactory.DEFAULT_CONSTRAINTS);
        new RandomSolver().solve(md);
        SudokuPrinter.printMultiDoku(RenderableMultidoku.fromMultidoku(md), Symbols.Numbers, 3, 3);
        SudokuSerializer.saveMultiDoku(md);
    }

    public static void overwriteTest(int n){
        MultiDoku md = SudokuFactory.createBasicXShapedMultidoku(3, SudokuFactory.DEFAULT_CONSTRAINTS);
        new RandomSolver().solve(md);
        SudokuPrinter.printMultiDoku(RenderableMultidoku.fromMultidoku(md), Symbols.Numbers, 3, 3);
        SudokuSerializer.saveMultiDoku(md, n);
    }

    public static void main(String[] args) {
        ConsoleInterface console = new ConsoleInterface();
        /*
        voidTest();
        filledTest();
        overwriteTest(0);
        overwriteTest(17)
        */
        console.welcome();
    }
}
