DEADSOFTWARE

Less hills
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / WorldGen.java
index fb1509e7a7c7aa503f75c0ec8e3fbdfe9dfc901a..b8e9aee59b953e9742366f1300b27d7b64414da4 100644 (file)
@@ -20,7 +20,8 @@ public class WorldGen {
         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);