introduce bitloops

This commit is contained in:
mike
2026-01-12 18:28:52 +01:00
parent a0862fcc43
commit 16676d633a
3 changed files with 103 additions and 96 deletions

View File

@@ -114,7 +114,6 @@ public record Export() {
for (int i = 0, len = s.len(); i < len; i++) cells[i] = s.pos(i);
char direction;
var isReversed = false;
var startRow = Grid.r(cells[0]);
var startCol = Grid.c(cells[0]);
if (d == 2) { // right -> horizontal
@@ -123,10 +122,8 @@ public record Export() {
direction = Placed.VERTICAL;
} else if (d == 4) { // left -> horizontal (REVERSED)
direction = Placed.HORIZONTAL;
isReversed = true;
} else if (d == 1) { // up -> vertical (REVERSED)
direction = Placed.VERTICAL;
isReversed = true;
} else {
return null;
}
@@ -139,7 +136,7 @@ public record Export() {
s.clueR(),
s.clueC(),
cells,
isReversed
!s.increasing()
);
}
public ExportedPuzzle exportFormatFromFilled(int difficulty, Rewards rewards) {