@logic-pad/core 0.7.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/logic-core.global.d.ts +72 -13
- package/dist/data/grid.js +1 -0
- package/dist/data/primitives.d.ts +2 -1
- package/dist/data/primitives.js +2 -0
- package/dist/data/rules/banPatternRule.js +8 -0
- package/dist/data/rules/musicGridRule.d.ts +1 -1
- package/dist/data/rules/musicGridRule.js +2 -7
- package/dist/data/rules/wrapAroundRule.d.ts +0 -2
- package/dist/data/rules/wrapAroundRule.js +124 -58
- package/dist/data/solver/allSolvers.js +2 -0
- package/dist/data/solver/backtrack/backtrackSolver.d.ts +2 -1
- package/dist/data/solver/backtrack/backtrackSolver.js +10 -2
- package/dist/data/solver/backtrack/backtrackWorker.js +11 -0
- package/dist/data/solver/backtrack/symbols/focus.d.ts +9 -0
- package/dist/data/solver/backtrack/symbols/focus.js +59 -0
- package/dist/data/solver/cspuz/cspuzSolver.d.ts +12 -0
- package/dist/data/solver/cspuz/cspuzSolver.js +113 -0
- package/dist/data/solver/cspuz/cspuzWorker.d.ts +1 -0
- package/dist/data/solver/cspuz/cspuzWorker.js +44 -0
- package/dist/data/solver/cspuz/jsonify.d.ts +3 -0
- package/dist/data/solver/cspuz/jsonify.js +211 -0
- package/dist/data/solver/eventIteratingSolver.d.ts +3 -2
- package/dist/data/solver/eventIteratingSolver.js +17 -3
- package/dist/data/solver/solver.d.ts +11 -6
- package/dist/data/solver/universal/universalSolver.d.ts +1 -0
- package/dist/data/solver/universal/universalSolver.js +6 -0
- package/dist/data/solver/universal/universalWorker.js +5 -0
- package/dist/data/solver/z3/z3Solver.d.ts +3 -1
- package/dist/data/solver/z3/z3Solver.js +13 -1
- package/dist/data/symbols/directionLinkerSymbol.js +22 -13
- package/dist/data/symbols/focusSymbol.d.ts +30 -0
- package/dist/data/symbols/focusSymbol.js +110 -0
- package/dist/data/symbols/minesweeperSymbol.d.ts +1 -1
- package/dist/data/symbols/minesweeperSymbol.js +9 -2
- package/dist/data/symbols/symbols.gen.d.ts +1 -0
- package/dist/data/symbols/symbols.gen.js +1 -0
- package/dist/data/symbols/viewpointSymbol.js +9 -11
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
|
@@ -65,8 +65,11 @@ class DirectionLinkerSymbol extends Symbol {
|
|
|
65
65
|
createExampleGrid() {
|
|
66
66
|
return DirectionLinkerSymbol.EXAMPLE_GRID;
|
|
67
67
|
}
|
|
68
|
-
deltaCoordinate(c, direction
|
|
69
|
-
return
|
|
68
|
+
deltaCoordinate(c, direction) {
|
|
69
|
+
return {
|
|
70
|
+
x: c.x + DirectionLinkerSymbol.directionDeltas[direction].dx,
|
|
71
|
+
y: c.y + DirectionLinkerSymbol.directionDeltas[direction].dy,
|
|
72
|
+
};
|
|
70
73
|
}
|
|
71
74
|
validateSymbol(grid) {
|
|
72
75
|
// A turtle is an object which have 2 coordinates
|
|
@@ -112,22 +115,28 @@ class DirectionLinkerSymbol extends Symbol {
|
|
|
112
115
|
const directions = Object.keys(this.linkedDirections);
|
|
113
116
|
for (const direction of directions) {
|
|
114
117
|
const newTurtle = {
|
|
115
|
-
pos1: this.deltaCoordinate(pos1, direction
|
|
116
|
-
pos2: this.deltaCoordinate(pos2, this.linkedDirections[direction]
|
|
118
|
+
pos1: this.deltaCoordinate(pos1, direction),
|
|
119
|
+
pos2: this.deltaCoordinate(pos2, this.linkedDirections[direction]),
|
|
117
120
|
color1: baseColor1,
|
|
118
121
|
color2: baseColor2,
|
|
119
122
|
};
|
|
120
|
-
|
|
121
|
-
pos1.
|
|
122
|
-
pos2.x
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
const newArrTurtle = {
|
|
124
|
+
pos1: grid.toArrayCoordinates(newTurtle.pos1.x, newTurtle.pos1.y),
|
|
125
|
+
pos2: grid.toArrayCoordinates(newTurtle.pos2.x, newTurtle.pos2.y),
|
|
126
|
+
color1: baseColor1,
|
|
127
|
+
color2: baseColor2,
|
|
128
|
+
};
|
|
129
|
+
if (checkedCouples.some(({ pos1, pos2 }) => pos1.x === newArrTurtle.pos1.x &&
|
|
130
|
+
pos1.y === newArrTurtle.pos1.y &&
|
|
131
|
+
pos2.x === newArrTurtle.pos2.x &&
|
|
132
|
+
pos2.y === newArrTurtle.pos2.y) ||
|
|
133
|
+
(pos1.x === newArrTurtle.pos2.x &&
|
|
134
|
+
pos1.y === newArrTurtle.pos2.y &&
|
|
135
|
+
pos2.x === newArrTurtle.pos1.x &&
|
|
136
|
+
pos2.y === newArrTurtle.pos1.y)) {
|
|
128
137
|
continue;
|
|
129
138
|
}
|
|
130
|
-
checkedCouples.push(
|
|
139
|
+
checkedCouples.push(newArrTurtle);
|
|
131
140
|
queue.push(newTurtle);
|
|
132
141
|
}
|
|
133
142
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnyConfig } from '../config.js';
|
|
2
|
+
import GridData from '../grid.js';
|
|
3
|
+
import NumberSymbol from './numberSymbol.js';
|
|
4
|
+
export default class FocusSymbol extends NumberSymbol {
|
|
5
|
+
private static readonly CONFIGS;
|
|
6
|
+
private static readonly EXAMPLE_GRID;
|
|
7
|
+
/**
|
|
8
|
+
* **Focus Numbers count directly adjacent cells of the same color**
|
|
9
|
+
* @param x - The x-coordinate of the symbol.
|
|
10
|
+
* @param y - The y-coordinate of the symbol.
|
|
11
|
+
* @param number - The focus number.
|
|
12
|
+
*/
|
|
13
|
+
constructor(x: number, y: number, number: number);
|
|
14
|
+
get id(): string;
|
|
15
|
+
get placementStep(): number;
|
|
16
|
+
get explanation(): string;
|
|
17
|
+
get configs(): readonly AnyConfig[] | null;
|
|
18
|
+
createExampleGrid(): GridData;
|
|
19
|
+
countTiles(grid: GridData): {
|
|
20
|
+
completed: number;
|
|
21
|
+
possible: number;
|
|
22
|
+
};
|
|
23
|
+
copyWith({ x, y, number, }: {
|
|
24
|
+
x?: number;
|
|
25
|
+
y?: number;
|
|
26
|
+
number?: number;
|
|
27
|
+
}): this;
|
|
28
|
+
withNumber(number: number): this;
|
|
29
|
+
}
|
|
30
|
+
export declare const instance: FocusSymbol;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ConfigType } from '../config.js';
|
|
2
|
+
import GridData from '../grid.js';
|
|
3
|
+
import { Color } from '../primitives.js';
|
|
4
|
+
import NumberSymbol from './numberSymbol.js';
|
|
5
|
+
const OFFSETS = [
|
|
6
|
+
[0, -1],
|
|
7
|
+
[1, 0],
|
|
8
|
+
[0, 1],
|
|
9
|
+
[-1, 0],
|
|
10
|
+
];
|
|
11
|
+
class FocusSymbol extends NumberSymbol {
|
|
12
|
+
/**
|
|
13
|
+
* **Focus Numbers count directly adjacent cells of the same color**
|
|
14
|
+
* @param x - The x-coordinate of the symbol.
|
|
15
|
+
* @param y - The y-coordinate of the symbol.
|
|
16
|
+
* @param number - The focus number.
|
|
17
|
+
*/
|
|
18
|
+
constructor(x, y, number) {
|
|
19
|
+
super(x, y, number);
|
|
20
|
+
}
|
|
21
|
+
get id() {
|
|
22
|
+
return `focus`;
|
|
23
|
+
}
|
|
24
|
+
get placementStep() {
|
|
25
|
+
return 1;
|
|
26
|
+
}
|
|
27
|
+
get explanation() {
|
|
28
|
+
return '*Focus Numbers* count directly adjacent cells of the same color';
|
|
29
|
+
}
|
|
30
|
+
get configs() {
|
|
31
|
+
return FocusSymbol.CONFIGS;
|
|
32
|
+
}
|
|
33
|
+
createExampleGrid() {
|
|
34
|
+
return FocusSymbol.EXAMPLE_GRID;
|
|
35
|
+
}
|
|
36
|
+
countTiles(grid) {
|
|
37
|
+
if (Math.floor(this.x) !== this.x || Math.floor(this.y) !== this.y)
|
|
38
|
+
return { completed: 0, possible: Number.MAX_SAFE_INTEGER };
|
|
39
|
+
const color = grid.getTile(this.x, this.y).color;
|
|
40
|
+
if (color === Color.Gray)
|
|
41
|
+
return { completed: 0, possible: Number.MAX_SAFE_INTEGER };
|
|
42
|
+
let gray = 0;
|
|
43
|
+
let same = 0;
|
|
44
|
+
const visited = [];
|
|
45
|
+
for (const [dx, dy] of OFFSETS) {
|
|
46
|
+
const x = this.x + dx;
|
|
47
|
+
const y = this.y + dy;
|
|
48
|
+
if (grid.wrapAround.value) {
|
|
49
|
+
const pos = grid.toArrayCoordinates(x, y);
|
|
50
|
+
if (visited.some(v => v.x === pos.x && v.y === pos.y))
|
|
51
|
+
continue;
|
|
52
|
+
visited.push(pos);
|
|
53
|
+
}
|
|
54
|
+
const tile = grid.getTile(x, y);
|
|
55
|
+
if (!tile.exists)
|
|
56
|
+
continue;
|
|
57
|
+
if (tile.color === Color.Gray)
|
|
58
|
+
gray++;
|
|
59
|
+
else if (tile.color === color)
|
|
60
|
+
same++;
|
|
61
|
+
}
|
|
62
|
+
return { completed: same, possible: same + gray };
|
|
63
|
+
}
|
|
64
|
+
copyWith({ x, y, number, }) {
|
|
65
|
+
return new FocusSymbol(x ?? this.x, y ?? this.y, number ?? this.number);
|
|
66
|
+
}
|
|
67
|
+
withNumber(number) {
|
|
68
|
+
return this.copyWith({ number });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
Object.defineProperty(FocusSymbol, "CONFIGS", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
configurable: true,
|
|
74
|
+
writable: true,
|
|
75
|
+
value: Object.freeze([
|
|
76
|
+
{
|
|
77
|
+
type: ConfigType.Number,
|
|
78
|
+
default: 0,
|
|
79
|
+
field: 'x',
|
|
80
|
+
description: 'X',
|
|
81
|
+
configurable: false,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: ConfigType.Number,
|
|
85
|
+
default: 0,
|
|
86
|
+
field: 'y',
|
|
87
|
+
description: 'Y',
|
|
88
|
+
configurable: false,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: ConfigType.Number,
|
|
92
|
+
default: 1,
|
|
93
|
+
field: 'number',
|
|
94
|
+
description: 'Number',
|
|
95
|
+
configurable: true,
|
|
96
|
+
},
|
|
97
|
+
])
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(FocusSymbol, "EXAMPLE_GRID", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
configurable: true,
|
|
102
|
+
writable: true,
|
|
103
|
+
value: Object.freeze(GridData.create(['wwwww', 'bbbbw', 'wwbbw', 'wwwww']).withSymbols([
|
|
104
|
+
new FocusSymbol(0, 0, 1),
|
|
105
|
+
new FocusSymbol(4, 1, 2),
|
|
106
|
+
new FocusSymbol(1, 3, 3),
|
|
107
|
+
]))
|
|
108
|
+
});
|
|
109
|
+
export default FocusSymbol;
|
|
110
|
+
export const instance = new FocusSymbol(0, 0, 1);
|
|
@@ -5,7 +5,7 @@ export default class MinesweeperSymbol extends NumberSymbol {
|
|
|
5
5
|
private static readonly CONFIGS;
|
|
6
6
|
private static readonly EXAMPLE_GRID;
|
|
7
7
|
/**
|
|
8
|
-
* **Minesweeper
|
|
8
|
+
* **Minesweeper Numbers count opposite cells in 8 adjacent spaces**
|
|
9
9
|
*
|
|
10
10
|
* @param x - The x-coordinate of the symbol.
|
|
11
11
|
* @param y - The y-coordinate of the symbol.
|
|
@@ -4,7 +4,7 @@ import { Color } from '../primitives.js';
|
|
|
4
4
|
import NumberSymbol from './numberSymbol.js';
|
|
5
5
|
class MinesweeperSymbol extends NumberSymbol {
|
|
6
6
|
/**
|
|
7
|
-
* **Minesweeper
|
|
7
|
+
* **Minesweeper Numbers count opposite cells in 8 adjacent spaces**
|
|
8
8
|
*
|
|
9
9
|
* @param x - The x-coordinate of the symbol.
|
|
10
10
|
* @param y - The y-coordinate of the symbol.
|
|
@@ -20,7 +20,7 @@ class MinesweeperSymbol extends NumberSymbol {
|
|
|
20
20
|
return 1;
|
|
21
21
|
}
|
|
22
22
|
get explanation() {
|
|
23
|
-
return `*Minesweeper
|
|
23
|
+
return `*Minesweeper Numbers* count opposite cells in 8 adjacent spaces`;
|
|
24
24
|
}
|
|
25
25
|
get configs() {
|
|
26
26
|
return MinesweeperSymbol.CONFIGS;
|
|
@@ -36,10 +36,17 @@ class MinesweeperSymbol extends NumberSymbol {
|
|
|
36
36
|
return { completed: 0, possible: Number.MAX_SAFE_INTEGER };
|
|
37
37
|
let gray = 0;
|
|
38
38
|
let opposite = 0;
|
|
39
|
+
const visited = [];
|
|
39
40
|
for (let y = this.y - 1; y <= this.y + 1; y++) {
|
|
40
41
|
for (let x = this.x - 1; x <= this.x + 1; x++) {
|
|
41
42
|
if (x === this.x && y === this.y)
|
|
42
43
|
continue;
|
|
44
|
+
if (grid.wrapAround.value) {
|
|
45
|
+
const pos = grid.toArrayCoordinates(x, y);
|
|
46
|
+
if (visited.some(v => v.x === pos.x && v.y === pos.y))
|
|
47
|
+
continue;
|
|
48
|
+
visited.push(pos);
|
|
49
|
+
}
|
|
43
50
|
const tile = grid.getTile(x, y);
|
|
44
51
|
if (!tile.exists)
|
|
45
52
|
continue;
|
|
@@ -2,6 +2,7 @@ export { instance as AreaNumberSymbol } from './areaNumberSymbol.js';
|
|
|
2
2
|
export { instance as CustomIconSymbol } from './customIconSymbol.js';
|
|
3
3
|
export { instance as CustomTextSymbol } from './customTextSymbol.js';
|
|
4
4
|
export { instance as DartSymbol } from './dartSymbol.js';
|
|
5
|
+
export { instance as FocusSymbol } from './focusSymbol.js';
|
|
5
6
|
export { instance as GalaxySymbol } from './galaxySymbol.js';
|
|
6
7
|
export { instance as HiddenSymbol } from './hiddenSymbol.js';
|
|
7
8
|
export { instance as LetterSymbol } from './letterSymbol.js';
|
|
@@ -6,6 +6,7 @@ export { instance as AreaNumberSymbol } from './areaNumberSymbol.js';
|
|
|
6
6
|
export { instance as CustomIconSymbol } from './customIconSymbol.js';
|
|
7
7
|
export { instance as CustomTextSymbol } from './customTextSymbol.js';
|
|
8
8
|
export { instance as DartSymbol } from './dartSymbol.js';
|
|
9
|
+
export { instance as FocusSymbol } from './focusSymbol.js';
|
|
9
10
|
export { instance as GalaxySymbol } from './galaxySymbol.js';
|
|
10
11
|
export { instance as HiddenSymbol } from './hiddenSymbol.js';
|
|
11
12
|
export { instance as LetterSymbol } from './letterSymbol.js';
|
|
@@ -31,19 +31,17 @@ class ViewpointSymbol extends NumberSymbol {
|
|
|
31
31
|
countForColor(grid, color, pos) {
|
|
32
32
|
let minSize = 1;
|
|
33
33
|
let maxSize = 1;
|
|
34
|
-
const
|
|
34
|
+
const visitedColored = array(grid.width, grid.height, (x, y) => x === pos.x && y === pos.y);
|
|
35
35
|
for (const direction of DIRECTIONS) {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
grid.iterateDirection(move(pos, direction), direction, tile => tile.color === color, () => {
|
|
37
|
+
minSize++;
|
|
38
|
+
}, visitedColored);
|
|
39
|
+
}
|
|
40
|
+
const visitedAll = array(grid.width, grid.height, (x, y) => x === pos.x && y === pos.y);
|
|
41
|
+
for (const direction of DIRECTIONS) {
|
|
42
|
+
grid.iterateDirection(move(pos, direction), direction, tile => tile.color === color || tile.color === Color.Gray, () => {
|
|
38
43
|
maxSize++;
|
|
39
|
-
|
|
40
|
-
continuous = false;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
if (continuous)
|
|
44
|
-
minSize++;
|
|
45
|
-
}
|
|
46
|
-
}, visited);
|
|
44
|
+
}, visitedAll);
|
|
47
45
|
}
|
|
48
46
|
return { completed: minSize, possible: maxSize };
|
|
49
47
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -60,12 +60,15 @@ import UniqueShapeBTModule from './data/solver/backtrack/rules/uniqueShape.js';
|
|
|
60
60
|
import AreaNumberBTModule from './data/solver/backtrack/symbols/areaNumber.js';
|
|
61
61
|
import DartBTModule from './data/solver/backtrack/symbols/dart.js';
|
|
62
62
|
import DirectionLinkerBTModule from './data/solver/backtrack/symbols/directionLinker.js';
|
|
63
|
+
import FocusBTModule from './data/solver/backtrack/symbols/focus.js';
|
|
63
64
|
import GalaxyBTModule from './data/solver/backtrack/symbols/galaxy.js';
|
|
64
65
|
import LetterBTModule from './data/solver/backtrack/symbols/letter.js';
|
|
65
66
|
import LotusBTModule from './data/solver/backtrack/symbols/lotus.js';
|
|
66
67
|
import MinesweeperBTModule from './data/solver/backtrack/symbols/minesweeper.js';
|
|
67
68
|
import MyopiaBTModule from './data/solver/backtrack/symbols/myopia.js';
|
|
68
69
|
import ViewpointBTModule from './data/solver/backtrack/symbols/viewpoint.js';
|
|
70
|
+
import CspuzSolver from './data/solver/cspuz/cspuzSolver.js';
|
|
71
|
+
import { gridToJson } from './data/solver/cspuz/jsonify.js';
|
|
69
72
|
import EventIteratingSolver from './data/solver/eventIteratingSolver.js';
|
|
70
73
|
import Solver from './data/solver/solver.js';
|
|
71
74
|
import UniversalSolver from './data/solver/universal/universalSolver.js';
|
|
@@ -88,6 +91,7 @@ import CustomSymbol from './data/symbols/customSymbol.js';
|
|
|
88
91
|
import CustomTextSymbol from './data/symbols/customTextSymbol.js';
|
|
89
92
|
import DartSymbol from './data/symbols/dartSymbol.js';
|
|
90
93
|
import DirectionLinkerSymbol from './data/symbols/directionLinkerSymbol.js';
|
|
94
|
+
import FocusSymbol from './data/symbols/focusSymbol.js';
|
|
91
95
|
import GalaxySymbol from './data/symbols/galaxySymbol.js';
|
|
92
96
|
import HiddenSymbol from './data/symbols/hiddenSymbol.js';
|
|
93
97
|
import { allSymbols } from './data/symbols/index.js';
|
|
@@ -102,4 +106,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
|
|
|
102
106
|
import TileData from './data/tile.js';
|
|
103
107
|
import TileConnections from './data/tileConnections.js';
|
|
104
108
|
import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
|
|
105
|
-
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|
|
109
|
+
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, FocusBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, CspuzSolver, gridToJson, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|
package/dist/index.js
CHANGED
|
@@ -63,12 +63,15 @@ import UniqueShapeBTModule from './data/solver/backtrack/rules/uniqueShape.js';
|
|
|
63
63
|
import AreaNumberBTModule from './data/solver/backtrack/symbols/areaNumber.js';
|
|
64
64
|
import DartBTModule from './data/solver/backtrack/symbols/dart.js';
|
|
65
65
|
import DirectionLinkerBTModule from './data/solver/backtrack/symbols/directionLinker.js';
|
|
66
|
+
import FocusBTModule from './data/solver/backtrack/symbols/focus.js';
|
|
66
67
|
import GalaxyBTModule from './data/solver/backtrack/symbols/galaxy.js';
|
|
67
68
|
import LetterBTModule from './data/solver/backtrack/symbols/letter.js';
|
|
68
69
|
import LotusBTModule from './data/solver/backtrack/symbols/lotus.js';
|
|
69
70
|
import MinesweeperBTModule from './data/solver/backtrack/symbols/minesweeper.js';
|
|
70
71
|
import MyopiaBTModule from './data/solver/backtrack/symbols/myopia.js';
|
|
71
72
|
import ViewpointBTModule from './data/solver/backtrack/symbols/viewpoint.js';
|
|
73
|
+
import CspuzSolver from './data/solver/cspuz/cspuzSolver.js';
|
|
74
|
+
import { gridToJson } from './data/solver/cspuz/jsonify.js';
|
|
72
75
|
import EventIteratingSolver from './data/solver/eventIteratingSolver.js';
|
|
73
76
|
import Solver from './data/solver/solver.js';
|
|
74
77
|
import UniversalSolver from './data/solver/universal/universalSolver.js';
|
|
@@ -91,6 +94,7 @@ import CustomSymbol from './data/symbols/customSymbol.js';
|
|
|
91
94
|
import CustomTextSymbol from './data/symbols/customTextSymbol.js';
|
|
92
95
|
import DartSymbol from './data/symbols/dartSymbol.js';
|
|
93
96
|
import DirectionLinkerSymbol from './data/symbols/directionLinkerSymbol.js';
|
|
97
|
+
import FocusSymbol from './data/symbols/focusSymbol.js';
|
|
94
98
|
import GalaxySymbol from './data/symbols/galaxySymbol.js';
|
|
95
99
|
import HiddenSymbol from './data/symbols/hiddenSymbol.js';
|
|
96
100
|
import { allSymbols } from './data/symbols/index.js';
|
|
@@ -105,4 +109,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
|
|
|
105
109
|
import TileData from './data/tile.js';
|
|
106
110
|
import TileConnections from './data/tileConnections.js';
|
|
107
111
|
import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
|
|
108
|
-
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|
|
112
|
+
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, FocusBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, CspuzSolver, gridToJson, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|