Gather data

This commit is contained in:
mike
2026-01-09 23:17:35 +01:00
parent e8a1ab6d19
commit a666305b76
5 changed files with 65 additions and 73 deletions

View File

@@ -14,16 +14,8 @@ import static puzzle.SwedishGenerator.DASH;
public class MainTest {
public static void main(String[] args) {
MainTest t = new MainTest();
t.testGridBasics();
t.testGridDeepCopy();
t.testMini();
t.testAttempt();
}
@Test
void testExtractSlots() {
var generator = new SwedishGenerator();
var grid = Grid.createEmpty();
// Set up digits on the grid to create slots.
@@ -32,9 +24,9 @@ public class MainTest {
grid.setCharAt(0, 1, 'A');
grid.setCharAt(0, 2, 'B');
var slots = generator.extractSlots(grid);
var slots = extractSlots(grid);
assertEquals(1, slots.size());
var s = slots.get(0);
var s = slots.getFirst();
assertEquals(8, s.len());
assertEquals(0, Grid.r(s.pos(0)));
assertEquals(1, Grid.c(s.pos(0)));
@@ -59,7 +51,6 @@ public class MainTest {
@Test
void testForEachSlot() {
var generator = new SwedishGenerator();
var grid = Grid.createEmpty();
grid.setClue(0, (byte) '2'); // right