introduce bitloops

This commit is contained in:
mike
2026-01-12 21:29:06 +01:00
parent 4784fa7180
commit 8e7b29a2d3
6 changed files with 27 additions and 12 deletions

View File

@@ -318,7 +318,7 @@ public record SwedishGenerator(Rng rng) {
public int clueIndex() { return clueIndex(key); }
public static int clueIndex(int key) { return key >>> BIT_FOR_DIR; }
public int clueC() { return Grid.c((key >>> BIT_FOR_DIR)); }
public int dir() { return key & 7; }
public static int dir(int key) { return key & 7; }
public boolean horiz() { return horiz(key); }
public boolean reversed() { return (key & 2) == 0; }
public boolean increasing() { return (key & 2) != 0; }