introduce bitloops
This commit is contained in:
@@ -538,8 +538,7 @@ public record SwedishGenerator(Rng rng) {
|
||||
idx = rng.randint(0, SIZE_MIN_1);
|
||||
if (g.isClue(idx)) continue;
|
||||
int d_idx = rng.randint2bit();
|
||||
val packed = OFFSETS_D_IDX[d_idx | idx << 2];
|
||||
if (g.hasRoomForClue(packed)) {
|
||||
if (g.hasRoomForClue(OFFSETS_D_IDX[d_idx | idx << 2])) {
|
||||
g.setClue(idx, (byte) (1 + (d_idx | 48)));
|
||||
placed++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user