refactoring, deploy Position and XYGridIterator
- try to use more Position instead of (x,y) - create PositionWithDpeth for its specific usage in path finding - create a XYGridITerator that walk cells from grid X then Y.
This commit is contained in:
@@ -229,6 +229,11 @@ public class MazeControler extends JPanel {
|
||||
return newActionButton("load", format, action);
|
||||
}
|
||||
|
||||
private JPanel createPaletteChooser()
|
||||
{
|
||||
return new JPanel(new FlowLayout());
|
||||
}
|
||||
|
||||
private JPanel createResolveQuitBar() {
|
||||
JPanel resolveQuitBar = new JPanel(new FlowLayout());
|
||||
|
||||
@@ -388,6 +393,7 @@ public class MazeControler extends JPanel {
|
||||
display.setAutoSize(autoSlide.isSelected());
|
||||
}
|
||||
});
|
||||
|
||||
final JCheckBox hexagon = new JCheckBox("hexagon");
|
||||
hexagon.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
@@ -395,11 +401,19 @@ public class MazeControler extends JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
final JCheckBox background = new JCheckBox("background");
|
||||
background.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
display.setBackground(background.isSelected());
|
||||
}
|
||||
});
|
||||
|
||||
JPanel resizecontrol = new JPanel(new FlowLayout());
|
||||
resizecontrol.add(showAll);
|
||||
resizecontrol.add(slider);
|
||||
resizecontrol.add(autoSlide);
|
||||
resizecontrol.add(hexagon);
|
||||
resizecontrol.add(background);
|
||||
|
||||
return resizecontrol;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user