savegame format upd?

This commit is contained in:
minjaesong
2021-02-12 14:14:09 +09:00
parent 46b56b8fd0
commit 6e63ab7fdc
3 changed files with 11 additions and 4 deletions

View File

@@ -18,6 +18,13 @@ import kotlin.math.roundToInt
internal class RNGPool() {
private val RNG = HQRNG()
private val used = SortedArrayList<Int>()
init {
for (i in 0 until 32767) {
used.add(i)
}
}
fun next(): Int {
var n = RNG.nextLong().ushr(32).toInt()
while (used.contains(n)) {