aboutsummaryrefslogtreecommitdiff
path: root/doc/diagrams/useCase_useAsBackend.puml
blob: 9076769d594a9e4c910983d5955a50e33f61efd5 (plain)
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
@startuml

!include skinparams.puml

actor "Opponent" as opponent
actor "GUI Program" as program

boundary "Engine CLI" as cli
control "Play a stone" as playStone
control "Think next move" as think
entity "Board state" as state

loop until starting board is set
    program -> cli : play stone
    cli -> playStone
    playStone -> state
    cli <- state
end

loop until game ends
    program -> cli : ask for move
    cli -> think
    think -> state
    cli <- state : Show move
    opponent -> program : give input
    program -> cli : play stone
    cli -> playStone
    playStone -> state
    cli <- state
end

@enduml