introduce bitloops
This commit is contained in:
@@ -20,15 +20,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static precomp.Const9x8.*;
|
||||
import static precomp.Const9x8.Cell.*;
|
||||
import static puzzle.Export.Clue.*;
|
||||
import static puzzle.Masker.Clues;
|
||||
import static puzzle.LemmaData.AB;
|
||||
import static puzzle.LemmaData.AZ;
|
||||
import static puzzle.SwedishGenerator.Lemma;
|
||||
import static puzzle.SwedishGenerator.Slotinfo;
|
||||
import static puzzle.SwedishGenerator.fillMask;
|
||||
import static puzzle.SwedishGeneratorTest.AB;
|
||||
import static puzzle.SwedishGeneratorTest.AZ;
|
||||
import static puzzle.SwedishGeneratorTest.CLUE_LEFT;
|
||||
import static puzzle.SwedishGeneratorTest.CLUE_RIGHT;
|
||||
import static puzzle.SwedishGeneratorTest.CLUE_UP;
|
||||
import static puzzle.SwedishGeneratorTest.LETTER_A;
|
||||
import static puzzle.SwedishGeneratorTest.LETTER_Z;
|
||||
|
||||
@@ -47,7 +43,7 @@ public class MainTest {
|
||||
}};
|
||||
@Test
|
||||
void testExtractSlots() {
|
||||
var clues = Clues.of(r0c0d1);
|
||||
var clues = Clued.of(r0c0d1);
|
||||
val key = r0c0d1.slotKey;
|
||||
var grid = new Gridded(clues);
|
||||
val g = grid.grid().g;
|
||||
@@ -75,7 +71,7 @@ public class MainTest {
|
||||
|
||||
@Test
|
||||
void testForEachSlot() {
|
||||
var clues = Clues.of(r0c0d1);
|
||||
var clues = Clued.of(r0c0d1);
|
||||
var count = new AtomicInteger(0);
|
||||
clues.forEachSlot((key, lo, hi) -> {
|
||||
count.incrementAndGet();
|
||||
@@ -96,7 +92,7 @@ public class MainTest {
|
||||
}
|
||||
@Test
|
||||
public void testGridBasics() {
|
||||
var clues = new Clued(Clues.of(r2c1d2));
|
||||
var clues = new Clued(Clued.of(r2c1d2));
|
||||
val key = r2c1d2.slotKey;
|
||||
var grid = new Gridded(clues.c());
|
||||
|
||||
@@ -130,7 +126,7 @@ public class MainTest {
|
||||
}
|
||||
@Test
|
||||
public void testCluesDeepCopy() {
|
||||
var clues = new Clued(Clues.of(r0c0d1, r0c1d2, r1c0d3, r1c1d0));
|
||||
var clues = new Clued(Clued.of(r0c0d1, r0c1d2, r1c0d3, r1c1d0));
|
||||
|
||||
var copy = clues.deepCopyGrid();
|
||||
var clueMap = clues.stream().collect(Collectors.toMap(ClueAt::index, ClueAt::clue));
|
||||
@@ -143,7 +139,7 @@ public class MainTest {
|
||||
}
|
||||
@Test
|
||||
public void testMini() {
|
||||
var clues = Clues.of(r1c1d3);
|
||||
var clues = Clued.of(r1c1d3);
|
||||
Assertions.assertTrue(clues.isClueLo(OFF_1_1));
|
||||
}
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user