package ru.deadsoftware.cavecraft.game; import com.badlogic.gdx.math.RandomXS128; import com.badlogic.gdx.utils.TimeUtils; public class WorldGen { private static int[][] foreMap, backMap; private static int[] noise; static int[] genNoise(int width, int mid, int min, int max) { RandomXS128 rand = new RandomXS128(TimeUtils.millis()); int[] res = new int[width]; int t; res[0] = mid; for (int i=1; imax) res[i] = max; } return res; } static void genWorld(int width, int height) { foreMap = new int[width][height]; backMap = new int[width][height]; noise = genNoise(width, height/2, 1, height); for (int x=0; x