introduce bitloops

This commit is contained in:
mike
2026-01-14 10:39:06 +01:00
parent cb2935e0f5
commit 66bd8193ef
4 changed files with 32 additions and 14 deletions

View File

@@ -100,7 +100,7 @@ public class SwedishGeneratorTest {
@Test
void testPatternForSlotAllDashes() {
var grid = createEmpty();
var grid = createEmpty();
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT), 7L, 0L);
var pattern = patternForSlot(grid, slot);
@@ -360,8 +360,8 @@ public class SwedishGeneratorTest {
grid.setLetter(OFF_0_2, LETTER_X); // Conflict at the end
assertFalse(placeWord(grid, s, w1, undoBuffer, 3));
// Verify grid is still empty (except for 'X')
assertEquals(DASH, grid.letter32At(OFF_0_0));
assertEquals(DASH, grid.letter32At(OFF_0_1));
assertFalse(grid.lisLetterAtLo(OFF_0_0));
assertFalse(grid.lisLetterAtLo(OFF_0_1));
assertEquals(LETTER_X, grid.letter32At(OFF_0_2));
}
@@ -382,8 +382,8 @@ public class SwedishGeneratorTest {
assertEquals(lo, undoBuffer[0]);
grid.undoPlace(undoBuffer[0], undoBuffer[1]);
assertEquals(DASH, grid.letter32At(OFF_0_1));
assertEquals(DASH, grid.letter32At(OFF_0_2));
assertFalse(grid.lisLetterAtLo(OFF_0_1));
assertFalse(grid.lisLetterAtLo(OFF_0_2));
}
@Test