Skip to content

Commit

Permalink
Export Structure
Browse files Browse the repository at this point in the history
  • Loading branch information
melusc committed May 28, 2022
1 parent 904653e commit 4bd537a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export {
type SubscriptionCallback,
SubscriptionCallback,
Sudoku,
type Cell,
type ReadonlyCells,
Cell,
ReadonlyCells,
Structure,
} from './sudoku.js';
11 changes: 2 additions & 9 deletions src/plugins/pointing-arrows.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {Sudoku, ReadonlyCells} from '../sudoku.js';
import type {Sudoku, Structure} from '../sudoku.js';
import {BetterMap, eachCandidate} from './shared.js';

const clearSection = (
structure: ReadonlyCells,
structure: Structure,
sudoku: Sudoku,
blockIndex: number,
numberToRemove: number,
Expand All @@ -28,13 +28,6 @@ export const pointingArrows = (sudoku: Sudoku): void => {
const blockRowIndex = Math.trunc(blockIndex / blockWidth) * blockWidth;
const blockColIndex = (blockIndex % blockWidth) * blockWidth;

/*
The first three bits are for cols
The last three are for rows
If one of the sections has only one bit,
that is a pointing arrow
*/
const summary = new BetterMap<
number,
{
Expand Down

0 comments on commit 4bd537a

Please sign in to comment.