introduce bitloops

This commit is contained in:
mike
2026-01-14 11:37:40 +01:00
parent c1706e1bf7
commit 8e049b3fa5
3 changed files with 62 additions and 65 deletions

View File

@@ -107,9 +107,7 @@ public record Export() {
}).limit(Long.bitCount(lo)));
}
}
//public boolean isLetterSet(int idx) { return isLetter(g[idx]); }
char NOT_CLUE_NOT_LETTER_TO(byte b, char fallback) {
if (b == SwedishGenerator.DASH) throw new RuntimeException();
char NOT_CLUE_NOT_LETTER_TO(byte b) {
return (char) (64 | b);
}
String gridToString(Clues clues) {
@@ -146,7 +144,7 @@ public record Export() {
if (clues.isClue(offset)) {
sb.append(clueChar.replace(new Cell(grid, clues, offset, clues.digitAt(offset))));
} else if (grid.lisLetterAt(offset)) {
sb.append(NOT_CLUE_NOT_LETTER_TO(grid.letter32At(offset), emptyFallback));
sb.append(NOT_CLUE_NOT_LETTER_TO(grid.letter32At(offset)));
} else {
sb.append(emptyFallback);
}