Classes | |
| interface | GridConverter |
| Component providing conversions between different Sudoku grid representations: More... | |
| class | GridConverterUTest |
| interface | GridMaster |
| Fournit les fonctionnalités essentielles pour générer et résoudre des grilles de Sudoku. More... | |
| class | GridMasterUTest |
| class | GridViewModelUTest |
Functions | |
| record | GrilleResolue (boolean solved, @Nonnull @NotNull(message="solvedGrid must not be null") @Size(min=CASES_NUMBER, max=CASES_NUMBER, message="solvedGrid must contain exactly 81 elements") int[] solvedGrid, @Min(value=0, message="possibilityPercentage must be >= 0") @Max(value=100, message="possibilityPercentage must be <= 100") int possibilityPercentage) |
| Immutable record representing a Sudoku grid resolution result. | |
| record | GrillesCrees ( @Nonnull @NotNull(message="grilleResolue must not be null") @Size(min=81, max=81) int[] grilleResolue, @Nonnull @NotNull(message="grilleAResoudre must not be null") @Size(min=81, max=81) int[] grilleAResoudre, @Min(value=-1, message="possibilityPercentage must be >= -1") @Max(value=100, message="possibilityPercentage must be <= 100") int pourcentageDesPossibilites) |
| Immutable record representing the dual output of a Sudoku grid generation. | |
| record | LevelPossibilityBounds (int min, int max) |
| Immutable container for level-specific possibility boundaries. | |
| record fr.softsf.sudokufx.common.util.sudoku.GrilleResolue | ( | boolean | solved, |
| @Nonnull @NotNull(message="solvedGrid must not be null") @Size(min=CASES_NUMBER, max=CASES_NUMBER, message="solvedGrid must contain exactly 81 elements") int[] | solvedGrid, | ||
| @Min(value=0, message="possibilityPercentage must be >= 0") @Max(value=100, message="possibilityPercentage must be <= 100") int | possibilityPercentage ) |
Immutable record representing a Sudoku grid resolution result.
Ensures data integrity through a fail-fast canonical constructor and defensive cloning to prevent representation exposure (SpotBugs EI_EXPOSE_REP).
| solved | True if the resolution was successful. |
| solvedGrid | Non-null array of {@value #CASES_NUMBER} elements [0-9]. |
| possibilityPercentage | Resolution progress estimate (0-100). |
Canonical constructor with deep validation and defensive cloning.
Performs a fail-fast check on solvedGrid integrity. Any violation (nullity, length, or range) is logged with a "██" marker before throwing an IllegalArgumentException.
| solved | Resolution status. |
| solvedGrid | The grid array to be cloned. |
| possibilityPercentage | Progress percentage (0-100). |
| IllegalArgumentException | if solvedGrid is null, has an invalid length, or contains values outside the [0-9] range. |
Returns a defensive copy of the solved grid.
solvedGrid.Compares equality based on components and array content via Arrays#equals.
| o | The object to compare. |
Returns a hash code based on all components and array content.
Returns a string representation of the record, including the content of the grid.
| record fr.softsf.sudokufx.common.util.sudoku.GrillesCrees | ( | @Nonnull @NotNull(message="grilleResolue must not be null") @Size(min=81, max=81) int[] | grilleResolue, |
| @Nonnull @NotNull(message="grilleAResoudre must not be null") @Size(min=81, max=81) int[] | grilleAResoudre, | ||
| @Min(value=-1, message="possibilityPercentage must be >= -1") @Max(value=100, message="possibilityPercentage must be <= 100") int | pourcentageDesPossibilites ) |
Immutable record representing the dual output of a Sudoku grid generation.
Holds both the complete solution and the initial puzzle state. Ensures state integrity through a fail-fast canonical constructor and defensive cloning of internal arrays to prevent representation exposure (SpotBugs EI_EXPOSE_REP).
| grilleResolue | The fully solved Sudoku grid (81 elements, values 0-9). |
| grilleAResoudre | The initial puzzle grid with holes (81 elements, values 0-9). |
| pourcentageDesPossibilites | Resolution progress or difficulty estimate (0-100), or -1 if the grid generation failed (e.g., watchdog timeout). |
Canonical constructor with deep validation and defensive cloning.
Validates both grids for nullity, length, and value ranges. Logs failures with a "██" marker before throwing IllegalArgumentException.
| grilleResolue | The solved grid to be cloned. |
| grilleAResoudre | The puzzle grid to be cloned. |
| pourcentageDesPossibilites | Progress percentage. |
| IllegalArgumentException | if any grid validation fails. |
Performs fail-fast validation on a grid array.
| grid | The array to validate. |
| fieldName | Name of the field for error reporting. |
Returns a defensive copy of the solved grid.
grilleResolue.Returns a defensive copy of the puzzle grid.
grilleAResoudre.Compares equality based on components and array contents via Arrays#equals.
| o | The object to compare with this instance. |
true if both records hold equivalent data and array contents.Returns a hash code based on all components and array contents.
Returns a string representation including array contents via Arrays#toString.
| record fr.softsf.sudokufx.common.util.sudoku.LevelPossibilityBounds | ( | int | min, |
| int | max ) |
Immutable container for level-specific possibility boundaries.
| min | the lower bound of the current level |
| max | the upper bound of the current level |