introduce bitloops
This commit is contained in:
@@ -84,7 +84,7 @@ public record SwedishGenerator() {
|
||||
x = y;
|
||||
return y;
|
||||
}
|
||||
static final byte[] BYTE = new byte[]{ 0, 1, 2, 3/*,4, 5*/ };
|
||||
static final byte[] BYTE = new byte[]{ 0, 1, 2, 3, 4, 5 };
|
||||
public byte randomClueDir() { return rand(BYTE); }
|
||||
public <T> T rand(T[] p) { return p[(int) (((nextU32() & 0xFFFFFFFFL) % ((long) p.length)))]; }
|
||||
public byte rand(byte[] p) { return p[(int) (((nextU32() & 0xFFFFFFFFL) % ((long) p.length)))]; }
|
||||
|
||||
Reference in New Issue
Block a user