introduce bitloops

This commit is contained in:
mike
2026-01-13 00:03:39 +01:00
parent 61d246e551
commit 6119722867
5 changed files with 47 additions and 49 deletions

View File

@@ -19,9 +19,9 @@ import static puzzle.SwedishGenerator.*;
public class ExportFormatTest {
static final byte CLUE_UP = 0;
static final byte CLUE_DOWN = 0;
static final byte CLUE_RIGHT = 1;
static final byte CLUE_DOWN = 2;
static final byte CLUE_UP = 2;
static final byte CLUE_LEFT = 3;
@Test
@@ -34,8 +34,8 @@ public class ExportFormatTest {
// This creates a slot starting at (0,1)
var clueMap = new HashMap<Integer, Long>();
// key = (cellIndex << 3) | (direction + 1)
var key = (0 << 3) | (CLUE_RIGHT + 1);
// key = (cellIndex << 2) | (direction)
var key = (0 << 2) | (CLUE_RIGHT);
clueMap.put(key, Lemma.from("TEST"));
// Manually fill the grid letters for "TEST" at (0,1), (0,2), (0,3), (0,4)