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