try to handle resolution of alternate path
=> to check SOLVED, might be set SOVLED while not fully tested.
This commit is contained in:
@@ -115,6 +115,7 @@ public class Display extends JFrame
|
||||
maze.resetWallsProvider(model);
|
||||
model.setMazeListener(maze);
|
||||
|
||||
model.reset();
|
||||
|
||||
// we are in GUI event thread, need to release it and do it outside.
|
||||
new Thread() {
|
||||
@@ -151,6 +152,7 @@ public class Display extends JFrame
|
||||
|
||||
void resolve()
|
||||
{
|
||||
model.reset();
|
||||
model.resolve(model.getWidth() - 1, model.getHeight() - 1, maze);
|
||||
}
|
||||
|
||||
@@ -446,6 +448,16 @@ public class Display extends JFrame
|
||||
}
|
||||
};
|
||||
savePngButton.addActionListener(savePngAction);
|
||||
final JButton saveButton = new JButton(labels.getString("save") +" raw");
|
||||
Action saveAction = new AbstractAction() {
|
||||
public void actionPerformed(ActionEvent evt)
|
||||
{
|
||||
//
|
||||
System.out.println("save");
|
||||
save((MazeParamsFixed) params,model);
|
||||
}
|
||||
};
|
||||
saveButton.addActionListener(saveAction);
|
||||
|
||||
final JButton quitButton = new JButton(labels.getString("quit"));
|
||||
Action quitAction = new AbstractAction() {
|
||||
@@ -462,6 +474,7 @@ public class Display extends JFrame
|
||||
resizecontrol.add(slider);
|
||||
resizecontrol.add(autoSlide);
|
||||
resizecontrol.add(savePngButton);
|
||||
resizecontrol.add(saveButton);
|
||||
resizecontrol.add(quitButton);
|
||||
|
||||
add(controlDisplayPanel, BorderLayout.SOUTH);
|
||||
@@ -1076,6 +1089,7 @@ public class Display extends JFrame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String pArgs[])
|
||||
{
|
||||
LabyModel model = null;
|
||||
|
||||
Reference in New Issue
Block a user