Sudoku review #1

Open
BordedDev wants to merge 19 commits from BordedDev/sudoku:main into main
Showing only changes of commit f08cd376a2 - Show all commits

View File

@ -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)]

Recent learned that the variables are optional in destruction, had them as _ before.

Recent learned that the variables are optional in destruction, had them as `_` before.
if (iters.length > 0) {
return iters[randInt(0, iters.length - 1)][0]
}