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:
philippe lhardy
2020-12-28 19:12:35 +01:00
parent 0c886f0cd1
commit 02fda1fc2e
15 changed files with 311 additions and 162 deletions

View File

@@ -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;