diff --git a/core/src/ru/deadsoftware/cavedroid/game/WorldGen.java b/core/src/ru/deadsoftware/cavedroid/game/WorldGen.java
index 4c9b9b23f68a1bfb823e44a1baffb087084a4b1b..cc02aea03f2dff4af2151175d451cb3c751c7f23 100644 (file)
import com.badlogic.gdx.math.RandomXS128;
import com.badlogic.gdx.utils.TimeUtils;
+import javax.annotation.CheckForNull;
+
class WorldGen {
+ @CheckForNull
private static RandomXS128 rand;
private static long seed;
+ @CheckForNull
private static int[][] foreMap, backMap;
+ @CheckForNull
private static int[] hMap;
+ @CheckForNull
private static int[] bMap; //biomes, 0-plains, 1-desert
public static long getSeed() {
}
private static void genCactus(int x, int y) {
+ assert foreMap != null;
foreMap[x][y] = 59;
foreMap[x][y - 1] = 59;
foreMap[x][y - 2] = 59;
}
private static void genOak(int x, int y) {
+ assert foreMap != null && backMap != null;
backMap[x][y] = 15;
backMap[x][y - 1] = 15;
backMap[x][y - 2] = 15;
}
static int[][] getForeMap() {
+ assert foreMap != null;
return foreMap;
}
static int[][] getBackMap() {
+ assert backMap != null;
return backMap;
}
static void clear() {
- foreMap = null;
- backMap = null;
hMap = null;
bMap = null;
}