summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01f293d)
raw | patch | inline | side by side (parent: 01f293d)
author | fred-boy <fred-boy@protonmail.com> | |
Wed, 25 Apr 2018 09:08:14 +0000 (16:08 +0700) | ||
committer | fred-boy <fred-boy@protonmail.com> | |
Wed, 25 Apr 2018 13:06:58 +0000 (20:06 +0700) |
core/src/ru/deadsoftware/cavecraft/game/WorldGen.java | patch | blob | history |
diff --git a/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java b/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java
index fb1509e7a7c7aa503f75c0ec8e3fbdfe9dfc901a..b8e9aee59b953e9742366f1300b27d7b64414da4 100644 (file)
int t;
res[0] = mid;
for (int i=1; i<width; i++) {
- t = rand.nextInt(3)-1;
+ t = rand.nextInt(7)-3;
+ if (t>-3 && t<3) t=0; else t/=Math.abs(t);
if (i>width-(max-min)) {
if (res[i-1]+t<res[0]) t=Math.abs(t);
else if (res[i-1]+t>res[0]) t=-Math.abs(t);