Add a toggle to dynamically change boxes type
maze:
* Fix EBox, ABox, DBox and WBox, which still used legacy coordinates
(x for y and y for x). See 213071d3 and #20
model:
* Add a toggle method to MazeAppModel. For a box given by its
coordinates, it toggles its type (Wall, Empty, Departure or
Arrival), sends a notification to observers and sets the maze's
status to 'not saved'.
ui:
* Fix SaveMazeMenuItem, which enabled itself whenever a Maze renewal
notification was received. It now enables itself only if a filename is
set (expected behavior).
* Add a MouseListener to MazeDrawing to catch clicks on boxes. The
selected box is found using the x and y coordinates of where the mouse
clicked.
* Now print a message when the user tries to draw the shortest path
whereas the maze doesn't contain an arrival and/or a departure.
This commit is contained in:
1 parent
7c1d136856
commit
37def85f5b
8 files changed
+112
-36
No files matched your search
+6
-8
@@ -5,14 +5,12 @@ package maze;
|
||||
*/
|
||||
|
||||
public class WBox extends Box {
|
||||
|
||||
|
||||
|
||||
public WBox (String label, int x, int y, Maze maze) {
|
||||
|
||||
super(label,x,y,maze) ;
|
||||
|
||||
|
||||
|
||||
public WBox (String label, int y, int x, Maze maze) {
|
||||
|
||||
super(label, y, x, maze) ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user