package code.kalter.longflight.crypto; /** * ГПСЧ * * @author Kalter */ public class Random { private int next; public Random(int next) { this.next = next; } public int random() { next ^= (next << 13); next ^= (next >>> 17); next ^= (next << 5); return Math.abs(next); } public int random(int max) { return random() % max; } }