introduce bitloops
This commit is contained in:
@@ -180,9 +180,9 @@ public class MainTest {
|
||||
128L,
|
||||
422762372923520L,
|
||||
192L);
|
||||
var filled = fillMask(rng, extractSlots(mask, dict.index()), mask.toGrid());
|
||||
var filled = fillMask(rng, extractSlots(mask, dict.index()), mask.toGrid(), false);
|
||||
Assertions.assertTrue(filled.ok(), "Puzzle generation failed (not ok)");
|
||||
Assertions.assertEquals(18, filled.wordCount(), "Number of assigned words changed");
|
||||
Assertions.assertEquals(18, filled.wordCount(0), "Number of assigned words changed");
|
||||
Assertions.assertEquals("SLEDE", Lemma.asWord(filled.clueMap()[282]));
|
||||
Assertions.assertEquals(-1L, filled.grid().grid().lo);
|
||||
Assertions.assertEquals(255L, filled.grid().grid().hi);
|
||||
@@ -201,7 +201,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().wordCount());
|
||||
System.out.println("[DEBUG_LOG] ClueMap Size: " + res.filled().wordCount(0));
|
||||
System.out.println("[DEBUG_LOG] Grid:");
|
||||
System.out.println(res.filled().grid().renderHuman(res.clues().c()));
|
||||
System.out.println(res.filled().grid().gridToString(res.clues().c()));
|
||||
@@ -214,15 +214,8 @@ public class MainTest {
|
||||
Assertions.assertTrue(res.filled().ok(), "Puzzle generation failed (not ok)");
|
||||
Assertions.assertEquals(12348, foundSeed, "Found seed changed");
|
||||
}
|
||||
boolean isLetter(byte b) { return (b & 64) != 0; }
|
||||
@Test
|
||||
public void testIsLetterA() {
|
||||
assertTrue(isLetter((byte) 'A'));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsLetterZ() {
|
||||
assertTrue(isLetter((byte) 'Z'));
|
||||
}
|
||||
boolean isLetter(byte b) { return (b & 64) != 0; }
|
||||
@Test public void testIsLetterA() { assertTrue(isLetter((byte) 'A')); }
|
||||
@Test public void testIsLetterZ() { assertTrue(isLetter((byte) 'Z')); }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user