DEADSOFTWARE

Remove seed from default world config
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / world / GameWorld.java
index 60a34e14353704bc0c76d52b505efa80cb9f7b58..b616424c313634ddb7e92fabf594969394cff0b5 100644 (file)
@@ -8,6 +8,7 @@ import ru.deadsoftware.cavedroid.game.GameScope;
 import ru.deadsoftware.cavedroid.game.mobs.FallingGravel;
 import ru.deadsoftware.cavedroid.game.mobs.FallingSand;
 import ru.deadsoftware.cavedroid.game.mobs.MobsController;
+import ru.deadsoftware.cavedroid.game.model.world.generator.WorldGeneratorConfig;
 import ru.deadsoftware.cavedroid.game.objects.Block;
 import ru.deadsoftware.cavedroid.game.objects.DropController;
 
@@ -51,7 +52,7 @@ public class GameWorld implements Disposable {
         if (isNewGame) {
             mWidth = DEFAULT_WIDTH;
             mHeight = DEFAULT_HEIGHT;
-            Pair<int[][], int[][]> maps = GameWorldGenerator.INSTANCE.generate(mWidth, mHeight, TimeUtils.millis());
+            Pair<int[][], int[][]> maps = new GameWorldGenerator(WorldGeneratorConfig.Companion.getDefaultWithSeed()).generate();
             mForeMap = maps.getFirst();
             mBackMap = maps.getSecond();
             mMobsController.getPlayer().respawn(this);
@@ -62,7 +63,7 @@ public class GameWorld implements Disposable {
             mHeight = mForeMap[0].length;
         }
 
-        mGameFluidsThread = new GameFluidsThread(this, mMobsController, Thread.currentThread());
+        mGameFluidsThread = new GameFluidsThread(this, mMobsController);
 
         mGameFluidsTimer = new Timer();
         mGameFluidsTimer.scheduleAtFixedRate(mGameFluidsThread, 0, GameFluidsThread.FLUID_UPDATE_INTERVAL_MS);
@@ -217,7 +218,7 @@ public class GameWorld implements Disposable {
                 setForeMap(x, y, 0);
                 mMobsController.addMob(FallingSand.class, x * 16, y * 16);
                 updateBlock(x, y - 1);
-            }   
+            }
         }
 
         if (getForeMap(x, y) == 11) {