This commit is contained in:
mike
2026-01-13 20:03:19 +01:00
parent 81ae0aa84c
commit 6ab6791d9c
6 changed files with 114 additions and 83 deletions

View File

@@ -16,21 +16,21 @@ import static puzzle.SwedishGenerator.DASH;
public class MainTest {
static final byte LETTER_A = (byte) 'A';
static final byte LETTER_B = (byte) 'B';
static final byte LETTER_Z = (byte) 'Z';
static final byte CLUE_DOWN = 0;
static final byte LETTER_A = (byte) 'A';
static final byte LETTER_B = (byte) 'B';
static final byte LETTER_Z = (byte) 'Z';
static final byte CLUE_DOWN = 0;
static final byte CLUE_RIGHT = 1;
static final byte CLUE_UP = 2;
static final byte CLUE_LEFT = 3;
static final byte CLUE_UP = 2;
static final byte CLUE_LEFT = 3;
static final int OFF_0_0 = Grid.offset(0, 0);
static final int OFF_0_1 = Grid.offset(0, 1);
static final int OFF_0_2 = Grid.offset(0, 2);
static final int OFF_1_1 = Grid.offset(1, 1);
static final int OFF_1_2 = Grid.offset(1, 2);
static final int OFF_2_3 = Grid.offset(2, 3);
@Test
void testExtractSlots() {
var grid = Grid.createEmpty();
@@ -163,7 +163,7 @@ public class MainTest {
foundSeed = seed;
System.out.println("[DEBUG_LOG] Seed found: " + seed);
System.out.println("[DEBUG_LOG] Simplicity: " + res.filled().stats().simplicity);
System.out.println("[DEBUG_LOG] ClueMap Size: " + res.filled().clueMap().size());
System.out.println("[DEBUG_LOG] ClueMap Size: " + res.filled().wordCount());
System.out.println("[DEBUG_LOG] Grid:");
System.out.println(res.filled().grid().renderHuman());
var aa = res.exportFormatFromFilled(1, new Rewards(1, 1, 1));
@@ -177,8 +177,8 @@ public class MainTest {
// Regression baseline for seed search starting at 12347, pop 4, gens 20
Assertions.assertEquals(12348, foundSeed, "Found seed changed");
Assertions.assertEquals(18, res.filled().clueMap().size(), "Number of assigned words changed");
Assertions.assertEquals("TROTS", Lemma.asWord(res.filled().clueMap().get(282)));
Assertions.assertEquals(18, res.filled().wordCount(), "Number of assigned words changed");
Assertions.assertEquals("SLEDE", Lemma.asWord(res.filled().clueMap()[282]));
Assertions.assertEquals(74732156493031040L, res.filled().grid().grid().lo);
Assertions.assertEquals(193L, res.filled().grid().grid().hi);
}