aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/class-diag.puml37
1 files changed, 32 insertions, 5 deletions
diff --git a/docs/class-diag.puml b/docs/class-diag.puml
index 2d890d5..32b7018 100644
--- a/docs/class-diag.puml
+++ b/docs/class-diag.puml
@@ -148,13 +148,41 @@ rectangle Group_Collisions as "Collisions" <<group>> {
rectangle Group_Pathfinding as "Pathfinding" <<group>> {
class PathfindingContext {
+ PathfindingContext(Museum &)
+ --
+ - start_point : XY <<+get>> <<+set>>
+ - end_point : XY <<+get>> <<+set>>
+ + valid_point(const XY &) : bool
+ + update()
+ --
+ + get_solver() : Pathfinder &
+ + cycle_solver()
+ --
+ - solvers : vec<uniq<Pathfinder>>
+ - solver_index : size_t
+ - museum : Museum &
}
class Pathfinder <<abstract>> {
+ Pathfinder(Museum &)
+ + find_between(const XY &, const XY &) <<pure virtual>
+ + get_path() : const forward_list<XY> & <<pure virtual>>
+ --
+ + is_visited(const XY &) : bool
+ # set_visited(const XY &)
+ --
+ # clear()
+ - visited : vec<bool>
--
# museum : Museum &
}
class BreadthFirstPathfinder {
+ + find_between(const XY &, const XY &)
+ + get_path() : const forward_list<XY> &
+ --
+ - find_step(const vec<forward_list<XY>> &) : vec<forward_list<XY>>
+ - solution : forward_list<XY>
+ - end : XY
+ --
+ # clear()
}
class DijkstraPathfinder {
}
@@ -185,7 +213,7 @@ rectangle Group_Model as "Model" <<group>> {
class Canvas {
+ Canvas(Museum &)
--
- + get_tile(x, y) : Tile &
+ + get_tile(XY) : Tile &
+ set_tile(TileData)
--
+ update()
@@ -222,7 +250,7 @@ rectangle Group_Model as "Model" <<group>> {
+ set_data(TileData &)
+ set_type(type : const string &)
+ update()
- + get_neighbor(dx, dy) : Tile *
+ + get_neighbor(XY) : Tile *
--
- museum : Museum &
}
@@ -408,11 +436,10 @@ rectangle Group_Commands as "Commands" <<group>> {
- files : vec<string>
}
class StepTileCommand {
- + constructor(Canvas &, pair<x, y>)
+ + constructor(Canvas &, const XY &)
--
- canvas : Canvas &
- - x : unsigned int
- - y : unsigned int
+ - tile_pos : XY
}
class TimeTravelCommand {
+ constructor(Museum &, forwards : bool)