introduce bitloops

This commit is contained in:
mike
2026-01-20 21:19:39 +01:00
parent ddce9addb5
commit b66437bb70
16 changed files with 502 additions and 564 deletions

View File

@@ -45,11 +45,15 @@ public record Export() {
static int INDEX(int r, int cols, int c) { return r * cols + c; }
@AllArgsConstructor
enum Clue {
DOWN(CLUE_DOWN),
RIGHT(CLUE_RIGHT),
UP(CLUE_UP),
LEFT(CLUE_LEFT);
DOWN(CLUE_DOWN, 'B', 'b'),
RIGHT(CLUE_RIGHT, 'A', 'a'),
UP(CLUE_UP, 'C', 'c'),
LEFT(CLUE_LEFT, 'D', 'd'),
NONE(CLUE_LEFT, '?', '?');
final byte dir;
final char slotChar, clueChar;
private static final Clue[] CLUES = new Clue[]{ DOWN, RIGHT, UP, LEFT, NONE, NONE, NONE, NONE, NONE };
public static Clue from(int dir) { return CLUES[dir]; }
}
record Strings() {
@@ -295,7 +299,7 @@ public record Export() {
p.arrowCol() - MIN_C,
p.isReversed(), bytes
)).toArray(WordOut[]::new);
var total = 0.0001d;
var total = 0.0001d;
for (var word : wordsOut) {
total += word.complex();
}