introduce bitloops
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user