Compare commits
3 Commits
3c6d69c343
...
058dc13c1c
Author | SHA1 | Date | |
---|---|---|---|
058dc13c1c | |||
18e468b17f | |||
24d8ab6763 |
@ -5,12 +5,9 @@ const maths = {};
|
||||
|
||||
expose({
|
||||
generate(regionWidth, regionHeight, clues) {
|
||||
const key = `${regionWidth}:${regionHeight}`;
|
||||
const math =
|
||||
maths[`${regionWidth}:${regionHeight}`] ||
|
||||
(maths[`${regionWidth}:${regionHeight}`] = new SudokuMath(
|
||||
regionWidth,
|
||||
regionHeight
|
||||
));
|
||||
maths[key] ?? (maths[key] = new SudokuMath(regionWidth, regionHeight));
|
||||
return math.generate(clues);
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user