Simplified is valid func
This commit is contained in:
parent
cfa484c6c3
commit
8e2a4d5095
@ -24,7 +24,7 @@ class SudokuPuzzle extends EventTarget {
|
||||
* undefined is an empty cell, null is a cell that was cleared
|
||||
* @typedef {(number|null|undefined)[]} SudokuState
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {SudokuState[]}
|
||||
@ -198,9 +198,7 @@ class SudokuPuzzle extends EventTarget {
|
||||
* @return boolean
|
||||
*/
|
||||
isValueValidForSlot(value, slot, state = this.#activeState) {
|
||||
return !this.#boxGetValues(slot, state)
|
||||
.union(this.#crossGetValues(slot, state))
|
||||
.has(value)
|
||||
return !this.getValues(slot, state).has(value)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user