Sudoku review #1
@ -30,7 +30,7 @@ class SudokuPuzzle extends EventTarget {
|
||||
*
|
||||
* @type {(number|null|undefined)[]}
|
||||
*/
|
||||
|
||||
#activeState = new Array(9 * 9)
|
||||
#activeState = new Array(SUDOKU_GRID_SIZE)
|
||||
retoor
commented
Ooooh, magic numbers :P Did i have that too? Ooooh, magic numbers :P Did i have that too?
BordedDev
commented
Dang it I missed it, it's meant to be Dang it I missed it, it's meant to be `SUDOKU_GRID_SIZE`. You did with the `new Puzzle(9)`
|
||||
|
||||
/**
|
||||
*
|
||||
@ -61,7 +61,7 @@ class SudokuPuzzle extends EventTarget {
|
||||
/**
|
||||
*
|
||||
* @param serializedState {string}
|
||||
* @returns {(?string)[]}
|
||||
* @returns {((number|null|undefined))[]}
|
||||
*/
|
||||
static #stateFromString(serializedState) {
|
||||
let cellIndex = 0
|
||||
|
Loading…
Reference in New Issue
Block a user
This contains a stack of states, essentially the initial state + all steps