introduce bitloops
This commit is contained in:
@@ -11,7 +11,7 @@ public class CornerClueTest {
|
||||
void testCornerDownSlot() {
|
||||
Clues clues = Clues.createEmpty();
|
||||
// Clue op (0,0), type 4 (Corner Down)
|
||||
int idx = SwedishGenerator.Grid.offset(0,0);
|
||||
int idx = Masker.offset(0, 0);
|
||||
clues.setClueLo(1L << idx, (byte)4);
|
||||
|
||||
assertEquals(4, clues.getDir(idx));
|
||||
@@ -22,10 +22,10 @@ public class CornerClueTest {
|
||||
if (Masker.Slot.dir(key) == 4) {
|
||||
found[0] = true;
|
||||
// Woord zou moeten starten op (0,1)
|
||||
int startIdx = SwedishGenerator.Grid.offset(0, 1);
|
||||
int startIdx = Masker.offset(0, 1);
|
||||
assertTrue((lo & (1L << startIdx)) != 0, "Slot should start at (0,1)");
|
||||
// En omlaag gaan
|
||||
int secondIdx = SwedishGenerator.Grid.offset(1, 1);
|
||||
int secondIdx = Masker.offset(1, 1);
|
||||
assertTrue((lo & (1L << secondIdx)) != 0, "Slot should continue to (1,1)");
|
||||
|
||||
// Lengte van het slot zou 8 moeten zijn (van rij 0 t/m 7 in kolom 1)
|
||||
@@ -38,7 +38,7 @@ public class CornerClueTest {
|
||||
@Test
|
||||
void testCornerDownExtraction() {
|
||||
Clues clues = Clues.createEmpty();
|
||||
int idx = SwedishGenerator.Grid.offset(0,0);
|
||||
int idx = Masker.offset(0, 0);
|
||||
clues.setClueLo(1L << idx, (byte)4);
|
||||
|
||||
DictEntry[] dict = DictData.DICT.index();
|
||||
|
||||
Reference in New Issue
Block a user