aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-15 19:41:41 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-15 19:41:41 +0200
commit157f77d6356f4fc2be209f879907f4289c8c511d (patch)
treed085b0454fc6daffe861cf88efce77985f887256 /docs
parentbf8fc7d0061d59418eed325c1a0fa0e94f465c01 (diff)
fix layout + add pathfinding and collision classes
Diffstat (limited to 'docs')
-rw-r--r--docs/class-diag.puml125
1 files changed, 65 insertions, 60 deletions
diff --git a/docs/class-diag.puml b/docs/class-diag.puml
index 389395a..e0f10c1 100644
--- a/docs/class-diag.puml
+++ b/docs/class-diag.puml
@@ -37,16 +37,16 @@ rectangle Group_FileReading as "File reading" <<group>> {
}
package CPR { }
- FileStrategy <|.. LocalFile
- FileStrategy <|.. HTTPFile
+ FileStrategy <|.u. LocalFile
+ FileStrategy <|.u. HTTPFile
+ FileStrategy .l> FileReader
FileStrategy <. FileReader
- FileStrategy .> FileReader
- HTTPFile -> CPR
+ HTTPFile -l> CPR
' LAYOUT
- LocalFile -r[hidden] HTTPFile
+ HTTPFile -r[hidden] LocalFile
}
rectangle Group_ParsingDeserialization as "Parsing & deserialization" <<group>> {
class Parser {
@@ -95,6 +95,15 @@ rectangle Group_ParsingDeserialization as "Parsing & deserialization" <<group>>
} /' LAYOUT '/
together { /' LAYOUT '/
+rectangle Group_Algorithms as "Algorithms" <<group>> {
+ class Pathfinding {
+ + Pathfinding(Museum &)
+ }
+ class Collision {
+ + Collision(Museum &)
+ }
+
+}
rectangle Group_Model as "Model" <<group>> {
class Museum {
+ people : People
@@ -242,20 +251,13 @@ rectangle Group_TileBehavior as "Tile behavior" <<group>> {
--
- last_interactions : unsigned int
}
-
- ' LAYOUT
- TileBehavior -d[hidden]- NullTileBehavior
- NullTileBehavior -d[hidden]- GrayTileBehavior
- GrayTileBehavior -d[hidden]- RedTileBehavior
- RedTileBehavior -d[hidden]- BlueTileBehavior
- BlueTileBehavior -d[hidden]- YellowTileBehavior
}
- TileBehaviorStrategy <|.[norank]. NullTileBehavior
- TileBehaviorStrategy <|.[norank]. GrayTileBehavior
- TileBehaviorStrategy <|.[norank]. RedTileBehavior
- TileBehaviorStrategy <|.[norank]. BlueTileBehavior
- TileBehaviorStrategy <|.[norank]. YellowTileBehavior
+ TileBehaviorStrategy <|.. NullTileBehavior
+ TileBehaviorStrategy <|.. GrayTileBehavior
+ TileBehaviorStrategy <|.. RedTileBehavior
+ TileBehaviorStrategy <|.. BlueTileBehavior
+ TileBehaviorStrategy <|.. YellowTileBehavior
Tile --> "state" TileBehavior
@@ -265,40 +267,6 @@ rectangle Group_TileBehavior as "Tile behavior" <<group>> {
} /' LAYOUT '/
together { /' LAYOUT '/
-rectangle Group_Commands as "Commands" <<group>> {
- class Command {
- # museum : Museum&
- # view : View&
- # controller : ViewController&
- --
- + Command(command : const Command *)
- + Command(museum, view, controller)
- }
-
- class MuseumPauseCommand {
- + toggle()
- + set(paused : bool)
- }
- class OpenFileGUICommand {
- + execute()
- }
- class ArtistVisibilityCommand {
- + toggle()
- + set(paused : bool)
- }
- class LoadFilesCommand {
- + execute(files)
- }
- class TileDecayCommand {
- + execute(x, y)
- }
-
- Command <|-u- MuseumPauseCommand
- Command <|-u- OpenFileGUICommand
- Command <|-u- ArtistVisibilityCommand
- Command <|-u- TileDecayCommand
- Command <|-d- LoadFilesCommand
-}
rectangle Group_Visualization as "Visualization" <<group>> {
struct Rectangle {
x : unsigned int
@@ -336,9 +304,43 @@ rectangle Group_Visualization as "Visualization" <<group>> {
ViewController <-- View
View --> SDL3
- View .> Rectangle
- ViewController .> KeyboardCode
- ViewController .> MouseCode
+ View .l> Rectangle
+ ViewController .l> KeyboardCode
+ ViewController .l> MouseCode
+}
+rectangle Group_Commands as "Commands" <<group>> {
+ class Command {
+ # museum : Museum&
+ # view : View&
+ # controller : ViewController&
+ --
+ + Command(command : const Command *)
+ + Command(museum, view, controller)
+ }
+
+ class MuseumPauseCommand {
+ + toggle()
+ + set(paused : bool)
+ }
+ class OpenFileGUICommand {
+ + execute()
+ }
+ class ArtistVisibilityCommand {
+ + toggle()
+ + set(paused : bool)
+ }
+ class LoadFilesCommand {
+ + execute(files)
+ }
+ class TileDecayCommand {
+ + execute(x, y)
+ }
+
+ Command <|-u- MuseumPauseCommand
+ Command <|-u- OpenFileGUICommand
+ Command <|-u- ArtistVisibilityCommand
+ Command <|-u- TileDecayCommand
+ Command <|-d- LoadFilesCommand
}
} /' LAYOUT '/
@@ -346,21 +348,24 @@ Command .[norank]> Museum
Command .[norank]> View
Command .[norank]> ViewController
-ParserStrategy ..> FileStrategy
-Deserializer .> Museum
+ParserStrategy .l> FileStrategy
+Deserializer .l> Museum
+
+Museum --> Pathfinding
+Museum --> Collision
ViewController -[norank]> Command
main -d-> Museum
main -u-> LoadFilesCommand
-main -[norank]> Deserializer
+' main -[norank]> Deserializer
main -[norank]> View
-main .l> Exception
+main .r> Exception
' LAYOUT
Group_TileBehavior -r[hidden] Group_TileAppearance
-Group_Model -r[hidden] Group_ParsingDeserialization
-Group_Commands -r[hidden] Group_Visualization
+Group_ParsingDeserialization -r[hidden] Group_Model
+' Collision -r[hidden] People
@enduml