47 lines
825 B
Plaintext
47 lines
825 B
Plaintext
classDiagram
|
|
class Maze {
|
|
+width
|
|
+height
|
|
+cells
|
|
+start
|
|
+exit
|
|
+get_neighbors()
|
|
}
|
|
|
|
class Cell {
|
|
+x
|
|
+y
|
|
+is_wall
|
|
+is_start
|
|
+is_exit
|
|
}
|
|
|
|
class MazeBuilder {
|
|
<<interface>>
|
|
+build_from_file()
|
|
}
|
|
|
|
class TextFileMazeBuilder {
|
|
+build_from_file()
|
|
}
|
|
|
|
class PathFindingStrategy {
|
|
<<interface>>
|
|
+find_path()
|
|
}
|
|
|
|
class BFSStrategy
|
|
class DFSStrategy
|
|
class AStarStrategy
|
|
|
|
class MazeSolver {
|
|
+solve()
|
|
}
|
|
|
|
Maze --> Cell
|
|
TextFileMazeBuilder ..|> MazeBuilder
|
|
BFSStrategy ..|> PathFindingStrategy
|
|
DFSStrategy ..|> PathFindingStrategy
|
|
AStarStrategy ..|> PathFindingStrategy
|
|
MazeSolver --> PathFindingStrategy
|
|
MazeSolver --> Maze |