introduce bitloops

This commit is contained in:
mike
2026-01-14 00:57:41 +01:00
parent 2430dbdfb9
commit 1d731334d9
6 changed files with 144 additions and 149 deletions

View File

@@ -35,7 +35,7 @@ public class ExportFormatTest {
var clueMap = new long[300];
// key = (cellIndex << 2) | (direction)
var key = (0 << 2) | (CLUE_RIGHT);
var key = (0) | (CLUE_RIGHT);
clueMap[key] = Lemma.from("TEST");
// Manually fill the grid letters for "TEST" at (0,1), (0,2), (0,3), (0,4)
@@ -44,9 +44,9 @@ public class ExportFormatTest {
grid.setLetter(Grid.offset(0, 3), (byte) 'S');
grid.setLetter(Grid.offset(0, 4), (byte) 'T');
// Terminate the slot at (0,5) with another digit to avoid it extending to MAX_WORD_LENGTH
grid.setClue(Grid.offset(0, 5), CLUE_UP);
grid.setClue(Grid.offset(0, 5), CLUE_LEFT);
var fillResult = new FillResult(true, new Gridded(grid), clueMap, new FillStats());
var fillResult = new FillResult(true, new Gridded(grid), clueMap, new FillStats(0, 0, 0, 0));
var puzzleResult = new PuzzleResult(swe, null, null, fillResult);
var rewards = new Rewards(10, 5, 1);
@@ -86,7 +86,7 @@ public class ExportFormatTest {
void testExportFormatEmpty() {
var swe = new SwedishGenerator(new Rng(0));
var grid = Grid.createEmpty();
var fillResult = new FillResult(true, new Gridded(grid), new long[300], new FillStats());
var fillResult = new FillResult(true, new Gridded(grid), new long[300], new FillStats(0, 0, 0, 0));
var puzzleResult = new PuzzleResult(swe, null, null, fillResult);
var exported = puzzleResult.exportFormatFromFilled(1, new Rewards(0, 0, 0));