-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathGameFlow.plantuml
50 lines (43 loc) · 1.36 KB
/
GameFlow.plantuml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@startuml
box "External World" #f6f6f6
actor Player as player
boundary Browser as browser
end box
box "Inbound Adapter" #c0d0e0
boundary YachtController as controller
end box
box "Application" #F3B467
participant "GameService \n <<Service>>" as gameService
participant "DiceRoller \n <<Service>>" as diceRoller
participant "DieRoller \n <<Port>>" as dieRoller
end box
box "Domain" #EDDE00
entity "Game\n<<Aggregate Root>>" as game
entity "Scoreboard\n<<Entity>>" as scoreboard
end box
box "Outbound Adapter" #C3B5D9
boundary "RandomDieRoller" as random
end box
player -> browser: Clicks [New Game]
browser -> controller: POST /start-game
controller -> gameService : start()
gameService -> game : new
game -> scoreboard: new
game <-- scoreboard : Scoreboard
game --> gameService : Game
controller -> browser: ScoreboardView
player -> browser: Click [Roll Dice]
browser -> controller: POST /rolldice
controller -> gameService: rollDice
gameService -> diceRoller : roll()
diceRoller -> dieRoller : roll()
dieRoller -> random : roll()
dieRoller <-- random : int
diceRoller --> gameService : DiceRoll
gameService -> game : rollDice(DiceRoll)
controller -> browser: ScoreboardView
note left: 'Ask for Category'
player -> browser: Click [Some Category]
browser -> controller: POST /select-category
controller -> game: assign DiceRoll\nto Category
@enduml