Split Display (gui) and Maze (work), prepare for another model

- prepare for a shorter storage model without any resolution
This commit is contained in:
philippe lhardy
2020-12-20 19:18:17 +01:00
parent a70ead877a
commit e146199ba0
15 changed files with 720 additions and 450 deletions

View File

@@ -5,7 +5,12 @@ import org.artisanlogiciel.games.maze.solve.SolvingModel;
import java.util.LinkedList;
import java.util.Scanner;
public class Main {
public class Main
extends Maze {
public Main(LabyModel model) {
super(model);
}
public MazeParamEditor editor() {
MazeParamEditor editor = new MazeParamEditor(null);
System.out.println("enter width height and maxdepth");
@@ -18,6 +23,7 @@ public class Main {
params.setSeed(1024L);
SolvingModel model = new SolvingModel(params);
model.generateWithEntry(0, 0);
setModel(model);
final int width = params.getWidth();
final int height = params.getHeight();
@@ -35,11 +41,10 @@ public class Main {
}
public static void main(String pArgs[]) {
Main m = new Main();
Main m = new Main(null);
MazeParamEditor editor = m.editor();
LabyMap map = m.generate2(editor);
System.out.println(map.toShortString());
System.out.println(map.toString());
System.out.println(Brick.getDirLine());
// ­_L|âJU¨©=[ªM]O
}
}