introduce bitloops
This commit is contained in:
17
src/main/java/puzzle/DictMarker.java
Normal file
17
src/main/java/puzzle/DictMarker.java
Normal 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 { }
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user