public class Sudoku {
    private Grid grid;
    private boolean solved;

    public Sudoku() {
        this.grid = new Grid(); // Initialiser avec une grille vide
        this.solved = false;
    }

    public static void main(String[] args) {
        Sudoku sudoku = new Sudoku();
        sudoku.printGrid(); // Afficher la grille non résolue dans la console
        new SudokuUI(sudoku);
    }
    
    public Grid getGrid() {
        return grid;
    }

    public void setGrid(Grid newGrid) {
        this.grid = newGrid;
    }

    public boolean isSolved() {
        return solved;
    }
    
    public void loadGridFromFile(String fileName) {
        this.grid.loadGridFromFile(fileName);
    }

    public void printGrid() {
        for (int row = 0; row < 9; row++) {
            for (int col = 0; col < 9; col++) {
                int value = grid.getCell(row, col).getValue();
                System.out.print(value + " ");
            }
            System.out.println(); // Passer à la ligne suivante après chaque ligne de la grille
        }
    }

}