introduce bitloops
This commit is contained in:
@@ -10,6 +10,8 @@ import puzzle.SwedishGenerator.Grid;
|
||||
import puzzle.SwedishGenerator.Lemma;
|
||||
import puzzle.SwedishGenerator.Rng;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
@@ -29,7 +31,7 @@ public class ExportFormatTest {
|
||||
var clueMap = new HashMap<Integer, Lemma>();
|
||||
// key = (cellIndex << 4) | direction
|
||||
var key = (0 << 4) | 2;
|
||||
var lemma = new Lemma("TEST", 1, "A test word");
|
||||
var lemma = new Lemma("TEST", 1);
|
||||
clueMap.put(key, lemma);
|
||||
|
||||
// Manually fill the grid letters for "TEST" at (0,1), (0,2), (0,3), (0,4)
|
||||
@@ -94,4 +96,16 @@ public class ExportFormatTest {
|
||||
assertTrue(row.matches("#+"));
|
||||
}
|
||||
}
|
||||
@Test
|
||||
void testIndex() {
|
||||
var csv = Paths.get("nl_score_hints_v3.csv");
|
||||
var idx = Paths.get("nl_score_hints_v3.idx");
|
||||
|
||||
try (var svc = new CsvIndexService(csv, idx)) {
|
||||
System.out.println(svc.getLine(1319));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user