-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plantUml: Explain how to use SD reference frames
- Loading branch information
damithc
committed
Sep 8, 2024
1 parent
6dcbb98
commit d6721a9
Showing
4 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@startuml | ||
|
||
hide footbox | ||
skinparam sequenceReferenceBackgroundColor #f7807c | ||
|
||
actor Player | ||
|
||
participant ":TextUi" as TextUi #EE82EE | ||
participant ":MSLogic" as MSLogic #90EE90 | ||
|
||
Player -> TextUi : mark x y | ||
TextUi -> MSLogic : markCellAt(x, y) | ||
return | ||
|
||
'This sequence can be abstracted into a reference frame for simplicity | ||
TextUi -> MSLogic : getAppearanceOfCellAt(x, y) | ||
MSLogic -> TextUi : getConfig() | ||
TextUi --> MSLogic : config | ||
MSLogic --> TextUi : cellAppearance | ||
'--- | ||
|
||
TextUi --> Player : Show updated minefield | ||
|
||
@enduml |
21 changes: 21 additions & 0 deletions
21
tutorials/images/plantuml/ParentReferenceFrameDiagram.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@startuml | ||
|
||
hide footbox | ||
skinparam sequenceReferenceBackgroundColor #f7807c | ||
|
||
actor Player | ||
|
||
participant ":TextUi" as TextUi #EE82EE | ||
participant ":MSLogic" as MSLogic #90EE90 | ||
|
||
Player -> TextUi : mark x y | ||
TextUi -> MSLogic : markCellAt(x, y) | ||
return | ||
|
||
ref over TextUi, MSLogic | ||
get minefield appearance | ||
end ref | ||
|
||
TextUi --> Player : Show updated minefield | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@startuml | ||
|
||
hide footbox | ||
|
||
participant ":TextUi" as TextUi #EE82EE | ||
participant ":MSLogic" as MSLogic #90EE90 | ||
|
||
group sd get minefield appearance | ||
'Contents of reference frame | ||
TextUi -> MSLogic : getAppearanceOfCellAt(x, y) | ||
MSLogic -> TextUi : getConfig() | ||
TextUi --> MSLogic : config | ||
MSLogic --> TextUi : cellAppearance | ||
end | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters