introduce bitloops

This commit is contained in:
mike
2026-01-20 23:24:24 +01:00
parent 7f15ab8ff1
commit 46b2bb04dc
6 changed files with 50 additions and 127 deletions

View File

@@ -648,6 +648,12 @@ 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);