feat : diminue automatiquement la difficulté si elle n'est pas possible
All checks were successful
Linux arm64 / Build (push) Successful in 38s

This commit is contained in:
Melvyn
2025-01-30 14:59:19 +01:00
parent 8596781ce3
commit 54a4bd9f22
2 changed files with 4 additions and 4 deletions

View File

@@ -3,10 +3,10 @@ package sudoku.structure;
//TODO: melvyn va passer par là
public enum Difficulty {
VeryEasy("Très facile", 0.1), Easy("Facile", 0.25), Medium("Moyen", 0.5), Hard("Difficile", 0.75);
VeryEasy("Très facile", 0.1), Easy("Facile", 0.25), Medium("Moyen", 0.5), Hard("Difficile", 0.75), VeryHard("Impossible", 0.78);
double factor;
String displayName;
final double factor;
final String displayName;
private Difficulty(String displayName, double factor) {
this.factor = factor;

View File

@@ -145,7 +145,7 @@ public class SudokuFactory {
cellsThatCanBeEmptied.remove(cellToEmpty);
}
return false;
return newDokuFromFilledOne(doku, --nbCellsToEmpty);
}
/**