feat : diminue automatiquement la difficulté si elle n'est pas possible
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,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;
|
||||
|
||||
@@ -145,7 +145,7 @@ public class SudokuFactory {
|
||||
cellsThatCanBeEmptied.remove(cellToEmpty);
|
||||
}
|
||||
|
||||
return false;
|
||||
return newDokuFromFilledOne(doku, --nbCellsToEmpty);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user