aboutsummaryrefslogtreecommitdiff
path: root/doc/diagrams
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2022-06-29 01:31:51 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2022-06-29 01:31:51 +0200
commitd5d3ffad63ff3c274430725dd519191ec0f33029 (patch)
tree8baf51a295542d0f13d1f30b8f60a52ee6880b35 /doc/diagrams
parent32ba965ef1312856ef1ef1a90bb945f9fdba5537 (diff)
downloadimago-d5d3ffad63ff3c274430725dd519191ec0f33029.tar.gz
imago-d5d3ffad63ff3c274430725dd519191ec0f33029.zip
Updated use cases documentation.
Diffstat (limited to 'doc/diagrams')
-rw-r--r--doc/diagrams/useCase_generateAMove.puml24
-rw-r--r--doc/diagrams/useCase_playAMatch.puml20
-rw-r--r--doc/diagrams/useCase_useAsBackend.puml35
-rw-r--r--doc/diagrams/useCases.puml2
4 files changed, 66 insertions, 15 deletions
diff --git a/doc/diagrams/useCase_generateAMove.puml b/doc/diagrams/useCase_generateAMove.puml
new file mode 100644
index 0000000..fa76edb
--- /dev/null
+++ b/doc/diagrams/useCase_generateAMove.puml
@@ -0,0 +1,24 @@
+@startuml
+
+!include skinparams.puml
+
+actor "GUI program / Human user" as user
+
+boundary "Engine CLI" as cli
+control "Play a stone" as playStone
+control "Think next move" as think
+entity "Board state" as state
+
+loop until desired board is set
+ user -> cli : play stone
+ cli -> playStone
+ playStone -> state
+ cli <- state
+end
+
+user -> cli : ask for move
+cli -> think
+think -> state
+cli <- state : Show move
+
+@enduml
diff --git a/doc/diagrams/useCase_playAMatch.puml b/doc/diagrams/useCase_playAMatch.puml
new file mode 100644
index 0000000..65d1517
--- /dev/null
+++ b/doc/diagrams/useCase_playAMatch.puml
@@ -0,0 +1,20 @@
+@startuml
+
+!include skinparams.puml
+
+actor "Player" as player
+
+boundary "Game CLI" as cli
+control "Play a stone" as playStone
+control "Show board" as showBoard
+entity "Board state" as state
+
+loop until game ends
+ player -> cli
+ cli -> playStone
+ playStone -> state
+ showBoard <- state
+ cli <- showBoard
+end
+
+@enduml
diff --git a/doc/diagrams/useCase_useAsBackend.puml b/doc/diagrams/useCase_useAsBackend.puml
index 3f1cece..9076769 100644
--- a/doc/diagrams/useCase_useAsBackend.puml
+++ b/doc/diagrams/useCase_useAsBackend.puml
@@ -2,22 +2,31 @@
!include skinparams.puml
+actor "Opponent" as opponent
actor "GUI Program" as program
-boundary "Set board state" as setState
-control "State set to represent the needed board" as setStateEngine
+boundary "Engine CLI" as cli
+control "Play a stone" as playStone
+control "Think next move" as think
entity "Board state" as state
-boundary "Move is asked for" as ask
-control "Engine thinks next move" as think
-boundary "Move is suggested" as suggestion
-program -> setState
-setState -> setStateEngine
-setStateEngine -> state
-state -> ask
-program -> ask
-ask -> think
-think -> suggestion
-program -> suggestion
+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
diff --git a/doc/diagrams/useCases.puml b/doc/diagrams/useCases.puml
index 022bd4c..8d4aa71 100644
--- a/doc/diagrams/useCases.puml
+++ b/doc/diagrams/useCases.puml
@@ -9,12 +9,10 @@ actor "Human User" as user
usecase "Play a match" as play
usecase "Use as backend for machine player" as backend
usecase "Generate a move" as genMove
-usecase "Train a neural network" as train
player --> play
gui --> backend
user --> genMove
gui --> genMove
-user --> train
@enduml