-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsession.puml
67 lines (57 loc) · 1.49 KB
/
session.puml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@startuml
actor Host #teal
participant Server
actor Guest #yellow
collections Spectators
group Setup
Host -> Server : createPreset(preset)
Host <-- Server : presetId
Host -> Server : createDraft(preset)
Host <-- Server : draftId
Host -> Server : join(draftId)
Host <-- Server : Draft
Host -> Server : set_role(HOST, name)
Server -> Spectators : player_joined(host, name)
Host <- Server : player_joined(host)
Guest -> Server : join(draftId)
Guest <-- Server : Draft
Guest -> Server : set_role(GUEST, name)
Host <- Server : player_joined(guest, name)
Server -> Spectators : player_joined(guest, name)
Guest <- Server : player_joined(guest, name)
loop 0..n
Spectators -> Server : join(draftId)
Spectators <-- Server : Draft
end
end
group Start
Guest -> Server: ready()
Host <- Server: ready(GUEST)
Server -> Spectators: ready(GUEST)
Host -> Server: ready()
Guest <- Server: ready(HOST)
Server -> Spectators: ready(HOST)
end
loop 0..n
alt Host action
Host -> Server: act(action, civ)
Host <- Server: act(action, civ)
Guest <- Server: act(action, civ)
Spectators <- Server: act(action, civ)
else Guest action
Guest -> Server: act(action, civ)
Guest <- Server: act(action, civ)
Host <- Server: act(action, civ)
Spectators <- Server: act(action, civ)
else Server action
Host <- Server: act(action, civ, additionalData)
Guest <- Server: act(action, civ, additionalData)
Spectators <- Server: act(action, civ, additionalData)
end
end
group End
Host <- Server: end()
Guest <- Server: end()
Spectators <- Server: end()
end
@enduml