introduce bitloops

This commit is contained in:
mike
2026-01-12 21:47:27 +01:00
parent 8e7b29a2d3
commit 88a61e6f4d
4 changed files with 5 additions and 11 deletions

View File

@@ -64,7 +64,6 @@ public record SwedishGenerator(Rng rng) {
static final byte B0 = (byte) 0;
static final byte B64 = (byte) 64;
static final byte B48 = (byte) 48;
static final long[] OFFSETS_D_IDX = Neighbors9x8.OFFSET_D_IDX;
static final rci[] IT = Neighbors9x8.IT;
static final int[][] MUTATE_RI = new int[SIZE][625];
@@ -314,10 +313,8 @@ public record SwedishGenerator(Rng rng) {
static Slot from(int key, long lo, long hi) { return new Slot(key, lo, hi); }
public int len() { return Long.bitCount(lo) + Long.bitCount(hi); }
public int clueR() { return Grid.r((key >>> BIT_FOR_DIR)); }
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 static int dir(int key) { return key & 7; }
public boolean horiz() { return horiz(key); }
public boolean reversed() { return (key & 2) == 0; }