Sudoku review #1
@ -95,7 +95,7 @@ class SudokuPuzzle extends EventTarget {
|
||||
* @returns {undefined|number}
|
||||
*/
|
||||
#sampleRandomEmptyField(stateToSample = this.#activeState) {
|
||||
const iters = [...stateToSample.entries().filter(([_, v]) => v == null)]
|
||||
const iters = [...stateToSample.entries().filter(([, v]) => v == null)]
|
||||
|
||||
if (iters.length > 0) {
|
||||
return iters[randInt(0, iters.length - 1)][0]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
Recent learned that the variables are optional in destruction, had them as
_
before.