Add java.util.random seed as initial parameter
- prepare for short save allowing to fully recreate initial lab having only seed and x,y,depth paramters
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.File;
|
||||
|
||||
public class MazeParamsFixed implements MazeParams
|
||||
{
|
||||
long seed;
|
||||
int width;
|
||||
int height;
|
||||
int maxdepth;
|
||||
@@ -27,10 +28,16 @@ public class MazeParamsFixed implements MazeParams
|
||||
maxdepth=MD;
|
||||
}
|
||||
|
||||
public MazeParamsFixed(File saveDir, int W, int H, int MD)
|
||||
public MazeParamsFixed(File saveDir, int W, int H, int MD, long seed)
|
||||
{
|
||||
name = null;
|
||||
setParams(saveDir,W,H,MD);
|
||||
this.seed=seed;
|
||||
}
|
||||
|
||||
public long getSeed()
|
||||
{
|
||||
return seed;
|
||||
}
|
||||
|
||||
public int getWidth()
|
||||
|
||||
Reference in New Issue
Block a user