Removed extra variable
This commit is contained in:
parent
8d1139b2e6
commit
f08cd376a2
@ -95,7 +95,7 @@ class SudokuPuzzle extends EventTarget {
|
|||||||
* @returns {undefined|number}
|
* @returns {undefined|number}
|
||||||
*/
|
*/
|
||||||
#sampleRandomEmptyField(stateToSample = this.#activeState) {
|
#sampleRandomEmptyField(stateToSample = this.#activeState) {
|
||||||
const iters = [...stateToSample.entries().filter(([_, v]) => v == null)]
|
const iters = [...stateToSample.entries().filter(([, v]) => v == null)]
|
||||||
if (iters.length > 0) {
|
if (iters.length > 0) {
|
||||||
return iters[randInt(0, iters.length - 1)][0]
|
return iters[randInt(0, iters.length - 1)][0]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user