fix: sudoku save
All checks were successful
Linux arm64 / Build (push) Successful in 23m59s

This commit is contained in:
2025-02-01 16:11:38 +00:00
parent 140d37fbd9
commit 52ca8b208c
3 changed files with 39 additions and 6 deletions

View File

@@ -69,6 +69,8 @@ public class ConsoleInterface {
}
System.out.println("Here's your sudoku !");
showMultidoku(doku, listSymbols, width, height);
System.out.println("You can now save it!");
saveMultiDoku(doku);
}
private MultiDoku saveChoice() {
@@ -175,4 +177,10 @@ public class ConsoleInterface {
SudokuPrinter.printMultiDoku(doku, listSymbols, width, height);
}
private void saveMultiDoku(MultiDoku doku){
System.out.println("Number of the file to overwrite ('-1' or unused save file number to create a new save) :");
int n = reader.nextInt();
String path = SudokuSerializer.saveMultiDoku(doku, n);
System.out.println("The path to your save is:" + path);
}
}