font update; ui remocon fix; save doc elaboration

UI RemoCon fix: RemoCon will no longer widen to the screen width when being used
This commit is contained in:
minjaesong
2018-09-14 01:14:13 +09:00
parent 16854a4be5
commit 3309998060
31 changed files with 172 additions and 42 deletions

View File

@@ -0,0 +1,29 @@
package net.torvald.terrarum.modulebasegame
import java.util.*
internal interface RNGConsumer {
val RNG: Random
var seed: Long
var iterations: Int
fun loadFromSave(seed: Long, iterations: Int) {
this.seed = seed
this.iterations = iterations
repeat(iterations, { RNG.nextInt() })
}
private fun incIterations() {
iterations++
if (iterations < 0) iterations = 0
}
fun getRandomLong(): Long {
iterations++
return RNG.nextLong()
}
}