Commit Graph
22 Commits
Author SHA1 Message Date
antograb 43feeaf93f Add editing functionalities 2018-01-02 22:07:42 +01:00
regar42 7c1d136856 Merge branch 'drawShortestPath' into mvc 2017-12-28 11:15:11 +01:00
antograb c7134e9e91 Fix infinite path in Dijkstra algorithm 2017-12-27 15:13:40 +01:00
regar42 97f9aa4ba0 Add generic maze generation methods
maze:
* Change emptySquareMaze() to become emptyMaze(int dimension)
* emptyMaze now takes 1 or 2 parameteres, and accordingly generate a
  square or a rectangle maze of the given dimension(s)
* Add wallMaze, which generate a maze full of walls. As emptyMaze, it
  takes one or two parameters
model:
* Update mazeAppModel tu use the new emptyMaze method
2017-12-23 21:00:03 +01:00
regar42 78dfe72e01 Open app on empty maze and improve load/save
model:
* Add a filename attribute to MazeAppModel to keep track of the file
  currently being used by the app
* Add saveToFile(filename) to save the maze into a specific file
* Rewrite saveToFile() to use the stored filename attribute to know into
  which file is to be used to save the maze, instead of the
  hardcoded path
* Remove unused models
* MazeAppModel is now initialized with an empty maze, instead of a
  maze read from a hardcoded path (see #13)
* Add a MazeAppModelMessage class to pass proper messages to observers
* Replace setMaze(maze) by loadMaze(filename) for now
* Move paintMaze into ui/MazeApp

ui:
* Add a Save As button (just a new name for the previous Save button)
  and implement an actual Save button (which saves into the file
  currently being used), disabled when no file is currently in use.
  (see #16)
* Create the FileBox class to handle file choices for the load, save,
  save as buttons
* Add keystrokes to trigger Load, Save or Save As actions from the menu

maze:
* Add a method to Maze to perform a deep copy of a matrix of boxes
* Add a static method to generate an empty maze of a fixed size (10*10)
  This behavior might change in the future
* Add a constructor to make a Maze from a matrix of boxes
2017-12-23 20:39:59 +01:00
antograb 3cdf425435 Add load maze 2017-12-20 21:05:56 +01:00
antograb 213071d3c2 Fix indexes confusion 2017-12-18 16:32:47 +01:00
antograb d9b52c35e2 [WIP] Load maze 2017-12-18 11:47:55 +01:00
regar42 79ed877d9d Merge branch 'boxTypeEdition' into mvc and cleanup
* Merge branch 'boxTypeEdition' into mvc
* Remove some useless spaces and blank lines
2017-12-16 20:40:27 +01:00
antograb f8623fdd7a Add Observer and Observable implementation
Add update method, notifyForUpdates methods
Currently not working
2017-12-16 14:51:39 +01:00
regar42 b59a8436dd Merge branch 'fixUnneededCode' into lastDijsktraClasses 2017-12-10 17:48:34 +01:00
regar42 5d75a82103 Merge branch 'javadoc' into lastDijsktraClasses 2017-12-10 15:40:43 +01:00
regar42 4d1d3b39a2 Add documentation and fix Javadoc warnings
* Describe the aim of the interfaces
* Explain what are the box inherited from Box
* Fix Javadoc warnings by specifying the parameters and returns of the
  methods in the interfaces
2017-12-10 15:27:57 +01:00
antograb 8db8b3faad Remove unneeded javadocs in Maze.java 2017-12-10 11:57:52 +01:00
regar42 ebb91b01b3 Code cleanup
* Remove unwanted getters and setters
* Properly handle object passed to constructors
* Remove redundant condition check on ASet.contains()'s return
* Make Maze.initFromTextFile() private
2017-12-10 00:02:20 +01:00
regar42 eb1e7a8bc0 Sharpen getCost and improve wallbox handling
* Rewrite getCost() from Maze to remove unneeded
  isWalkable checks on boxes
* Return an empty neighbor list for wall boxes
  (in generateNeighbours() from Maze)
2017-12-10 00:02:15 +01:00
antograb 8a8eac7ac1 Added some documentation for classes and methods of modified files. 2017-12-07 14:29:04 +01:00
antograb 9d34134943 Added documentation for modified interfaces. 2017-12-07 11:51:14 +01:00
regar42 bc1886ca94 Fix rectangle maze generation
Switch compteurColonne and compteurLigne
Despite their names, compteurColonne and compteurLigne
respectively represent the x and y coordinates
2017-12-07 10:59:07 +01:00
antograb d7368f7cda Fixed last dijkstra classes. Algorithm working for squared maze but bugs for non square mazes. 2017-12-06 22:30:58 +01:00
antograb 3b674f6049 Added Pi class. Modified Dijsktra and fixed Maze class. 2017-12-03 20:57:01 +01:00
antograb acab098ea1 Added packages, Previous class and ASet class. 2017-12-03 20:41:05 +01:00