diff options
| author | Fuwn <[email protected]> | 2025-11-20 21:39:18 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-11-20 21:53:25 -0800 |
| commit | 5ccd4667082a7ba69b737d252e239c3ac77fe658 (patch) | |
| tree | bbd4060335beb4332574993f499310b53ebed1d4 /diagrams/assignment_3/mmd/system_flow.mmd | |
| parent | feat: Implement Assignment 3 functionality (diff) | |
| download | cst276-5ccd4667082a7ba69b737d252e239c3ac77fe658.tar.xz cst276-5ccd4667082a7ba69b737d252e239c3ac77fe658.zip | |
feat: Add Assignment 3 diagram sources
Diffstat (limited to 'diagrams/assignment_3/mmd/system_flow.mmd')
| -rw-r--r-- | diagrams/assignment_3/mmd/system_flow.mmd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/diagrams/assignment_3/mmd/system_flow.mmd b/diagrams/assignment_3/mmd/system_flow.mmd new file mode 100644 index 0000000..d3bd105 --- /dev/null +++ b/diagrams/assignment_3/mmd/system_flow.mmd @@ -0,0 +1,31 @@ +sequenceDiagram + participant P as Program + participant FR as FileReader + participant CR as CSVReader + participant MR as MorgReader + participant MF as MorgFactory + participant M as Morg + participant D as Dish + participant S as Simulator~Morg~ + + P->>FR: new FileReader("morgs.txt") + FR->>CR: new CSVReader(fileReader) + CR->>MR: new MorgReader(csvReader, factory) + MR->>MF: CreateEntity(...) + MF->>MF: CreateMovementStrategy() + MF->>MF: CreateFeedingStrategy() + MF->>MF: ParsePreyTypes() + MF-->>MR: Morg instance + MR-->>P: Morg + P->>D: AddMorg(morg) + D->>S: AddEntity(morg) + + P->>D: Run(RUN_TIME) + D->>S: Run(runTime) + loop Template Method + S->>S: ProcessTimeStep() + S->>S: FindPreyIfNeeded() + S->>M: Move() + M->>M: Notify() + S->>S: CheckAndFeed() + end |