Release Notes¶
0.6.3¶
18 August 2018- fixed
Add missing dates to release notes.
0.6.1¶
18 August 2018- fixed
Changed lodash dependency to 4.17.5 due to vulnerability issues.
0.6.0¶
18 August 2018- changed
Changed licensing to use the MIT License.
0.5.0¶
28 October 2017- changed
Changed
sudoku.grid.SudokuGrid.update()
to return the number of solved cells instead of whether any candidates have been modified. - changed
Changed
sudoku.cell.SudokuCell.updateCandidates()
to return directly with ‘false’ if the cell is already solved. - new
Added
sudoku.cell.SudokuCellError()
and use it instead of the generic error class forSudokuCell()
in order to include the cell identifier when an error is thrown. - changed
Changed
SudokuCell()
to throwSudokuCellError()
when an incoherent list of candidates is provided to a cell. - changed
Changed
sudoku.cell.SudokuCell.updateCandidates()
to throwSudokuCellError()
when it attempts to set an incoherent list of candidates to a cell.const cell = new SudokuCell(0, 1, 9) // This would result to an empty candidate list, whereas the cell // does not have a value yet... cell.updateCandidates([1, 4, 6], [2, 3, 5], [7, 8, 9])
0.4.0¶
24 October 2017- changed
Renamed
sudoku.grid.SudokuGrid.toMapping()
tosudoku.grid.SudokuGrid.toValueMapping()
for clarity. - new
Added
sudoku.grid.SudokuGrid.toCandidateMapping()
to return a mapping of all candidates per cell identifier.
0.3.2¶
22 October 2017- fixed
Fix package version.
0.3.0¶
21 October 2017- changed
Changed the logic which leads to the modification of cell candidate numbers when a strategy have been successfully applied:
Instead of storing new candidate numbers in a ‘next’ buffer list attribute within the
SudokuCell()
instance and updating the cell candidates list only whensudoku.grid.SudokuGrid.updateCandidates()
is called, each strategy’s ‘processGrid’ method should return a mapping ofcloned instances
which contain the updated candidates.Changed
sudoku.solver.SudokuSolver.resolve()
so to take care of the update of each cell candidates. - new
Added optional argument to set initial candidates to a
SudokuCell()
. - new
Added optional argument to set initial candidates for each
SudokuCell()
instance within aSudokuGrid()
instance. - new
Added
sudoku.cell.SudokuCell.validateCandidates()
to throw an error when the list of candidate numbers set to aSudokuCell()
is incoherent with its value. - new
Added
sudoku.grid.SudokuGrid.cellFromId()
to retrieve a specificSudokuCell()
instance from aSudokuGrid()
using its identifier:>>> const grid = new SudokuGrid({c36: 7}) >>> const cell = grid.cellFromId("c36") >>> cell.value 7
- fixed
The assumption that setting a new value to a cell should automatically empty the candidate list was incorrect as a value of zero should bring back a list of possible candidate numbers, which is impossible to guess from the scope of the cell as it should be computed relatively to the entire grid (see
sudoku.grid.SudokuGrid.updateCandidates()
).Therefore, the setter to manually change the value of a
SudokuCell()
has been removed in favor of a setter to manually change its candidate numbers. It is safer to rely on a candidates setter and on thesudoku.cell.SudokuCell.resolve()
method to update a cell value:>>> cell = new SudokuCell(0, 0, 0) >>> cell.candidates = [3] >>> cell.resolve() >>> cell.value 3
0.2.0¶
15 October 2017- new
Added setter to manually change the value of a
SudokuCell()
and empty its list of candidates.
0.1.0¶
12 October 2017- new
Added
BoxLineReductionStrategy()
to identify when a candidate number appears two or three time within the row or column of a block and remove it from other cells of the block. - new
Added
PointingStrategy()
to identify when a candidate number appears two or three time within the row or column of a block and remove it from other cells in the rest of the row or column. - new
Added
NakedTripleStrategy()
to identify when three candidate numbers can only be in three specific cells from a row, a column or a block and remove these candidates from other cells. - new
Added
NakedPairStrategy()
to identify when two candidate numbers can only be in two specific cells from a row, a column or a block and remove these candidates from other cells. - new
Added
HiddenQuadStrategy()
to identify when four cells from a row, a column or a block can only contain four specific candidate numbers and remove other candidate numbers from those cells. - new
Added
HiddenTripleStrategy()
to identify when three cells from a row, a column or a block can only contain three specific candidate numbers and remove other candidate numbers from those cells. - new
Added
HiddenPairStrategy()
to identify when two cells from a row, a column or a block can only contain two specific candidate numbers and remove other candidate numbers from those cells. - new
Added
HiddenSingleStrategy()
to identify when a cell from a row, a column or a block can only contain a specific candidate number and remove other candidate numbers from this cell. - new
Initial release including a
SudokuSolver()
which can apply strategies to resolveSudokuCell()
within aSudokuGrid()
.