From 8e2a4d5095e16f8ced4bbe7972aa0b7b9b5be6fb Mon Sep 17 00:00:00 2001 From: Benjamin Claassen Date: Fri, 17 Jan 2025 01:12:10 +0100 Subject: [PATCH] Simplified is valid func --- reviews/BordedDev/sudoku.rewrite.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reviews/BordedDev/sudoku.rewrite.js b/reviews/BordedDev/sudoku.rewrite.js index 765bc9b..caf5a73 100644 --- a/reviews/BordedDev/sudoku.rewrite.js +++ b/reviews/BordedDev/sudoku.rewrite.js @@ -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) } /**