introduce bitloops

This commit is contained in:
mike
2026-01-21 00:09:37 +01:00
parent 46b2bb04dc
commit 78f72a024e
11 changed files with 516 additions and 546 deletions

View File

@@ -0,0 +1,17 @@
package puzzle;
import gen.GenerateDict;
@GenerateDict(
packageName = "puzzle",
className = "LemmaData",
scv = "nl_score_hints_v4.csv",
words = {
"EEN", "NAAR", "IEDEREEN", "A", "C", "X", "TEST", "IN", "INE", "INER", "INEREN", "INERENA", "INERENAE",
"APPLE", "AXE", "ABC", "ABD", "AZ", "AB",
"AT", "CAT", "DOGS", "APPLY", "BANAN", "BANANA", "BANANAS", "BANANASS"
},
minLen = 2,
maxLen = 8
)
public class DictMarker { }

View File

@@ -75,6 +75,11 @@ public record Export() {
for (var cell1 : cell) empty.setClue(cell1);
return empty;
}
public static Clues of(Cell... cells) {
var c = createEmpty();
for (var cell : cells) c.setClue(cell);
return c;
}
public Clued deepCopyGrid() { return new Clued(new Clues(c.lo, c.hi, c.vlo, c.vhi, c.rlo, c.rhi, c.xlo, c.xhi)); }
public static Clued parse(String s) {
var c = createEmpty();

View File

@@ -648,12 +648,6 @@ public final class Masker {
long lo, hi, vlo, vhi, rlo, rhi, xlo, xhi;
public static Clues createEmpty() { return new Clues(0, 0, 0, 0, 0, 0, 0, 0); }
public static Clues of(precomp.Const9x8.Cell... cells) {
var c = createEmpty();
for (var cell : cells) c.setClue(cell);
return c;
}
public boolean hasRoomForClue(int key) {
if (Slotinfo.increasing(key)) if (!validSlot(lo, hi, key)) return false;
return validSlotRev(lo, hi, key);