diff options
Diffstat (limited to 'doc/diagrams')
-rw-r--r-- | doc/diagrams/ASTNode.pumlc | 10 | ||||
-rw-r--r-- | doc/diagrams/GameMove.pumlc | 13 | ||||
-rw-r--r-- | doc/diagrams/GameState.pumlc | 14 | ||||
-rw-r--r-- | doc/diagrams/GameTree.pumlc | 8 | ||||
-rw-r--r-- | doc/diagrams/MoveParser.pumlc | 7 | ||||
-rw-r--r-- | doc/diagrams/SGF.pumlc | 8 | ||||
-rw-r--r-- | doc/diagrams/gameRepresentation.puml | 14 | ||||
-rw-r--r-- | doc/diagrams/gtpEngine.puml | 29 | ||||
-rw-r--r-- | doc/diagrams/modules.puml | 9 | ||||
-rw-r--r-- | doc/diagrams/sgfModule.puml | 17 | ||||
-rw-r--r-- | doc/diagrams/sgflex.pumlc | 8 | ||||
-rw-r--r-- | doc/diagrams/sgfyacc.pumlc | 8 | ||||
-rw-r--r-- | doc/diagrams/skinparams.puml | 9 |
13 files changed, 154 insertions, 0 deletions
diff --git a/doc/diagrams/ASTNode.pumlc b/doc/diagrams/ASTNode.pumlc new file mode 100644 index 0000000..05c13ac --- /dev/null +++ b/doc/diagrams/ASTNode.pumlc @@ -0,0 +1,10 @@ +@startuml + +class ASTNode { + ASTNode[] children + Property properties + void addtoSequence() + GameTree toGameTree() +} + +@enduml diff --git a/doc/diagrams/GameMove.pumlc b/doc/diagrams/GameMove.pumlc new file mode 100644 index 0000000..7dcb5e3 --- /dev/null +++ b/doc/diagrams/GameMove.pumlc @@ -0,0 +1,13 @@ +@startuml + +class GameMove { + int player + int row + int col + int[2] makesKo + int[] board + GameMove[] nextMoves + GameMove previousMove +} + +@enduml diff --git a/doc/diagrams/GameState.pumlc b/doc/diagrams/GameState.pumlc new file mode 100644 index 0000000..db39d8f --- /dev/null +++ b/doc/diagrams/GameState.pumlc @@ -0,0 +1,14 @@ +@startuml + +class GameState { + int player + int capturesBlack + int capturesWhite + List board + List prevBoards # for ko + GameTree gameTree + GameMove lastMove + GameData gameData +} + +@enduml diff --git a/doc/diagrams/GameTree.pumlc b/doc/diagrams/GameTree.pumlc new file mode 100644 index 0000000..85859d8 --- /dev/null +++ b/doc/diagrams/GameTree.pumlc @@ -0,0 +1,8 @@ +@startuml + +class GameTree { + GameNode[] firstMoves + GameData gameData +} + +@enduml diff --git a/doc/diagrams/MoveParser.pumlc b/doc/diagrams/MoveParser.pumlc new file mode 100644 index 0000000..4c0dc00 --- /dev/null +++ b/doc/diagrams/MoveParser.pumlc @@ -0,0 +1,7 @@ +@startuml + +class MoveParser { + int[] parseMove(input) +} + +@enduml diff --git a/doc/diagrams/SGF.pumlc b/doc/diagrams/SGF.pumlc new file mode 100644 index 0000000..2c30202 --- /dev/null +++ b/doc/diagrams/SGF.pumlc @@ -0,0 +1,8 @@ +@startuml + +class SGF { + GameTree loadGameTree(file) + void saveGameTree(file) +} + +@enduml diff --git a/doc/diagrams/gameRepresentation.puml b/doc/diagrams/gameRepresentation.puml new file mode 100644 index 0000000..9a869f1 --- /dev/null +++ b/doc/diagrams/gameRepresentation.puml @@ -0,0 +1,14 @@ +@startuml + +!include skinparams.puml + +!include GameState.pumlc +!include GameTree.pumlc +!include GameMove.pumlc + +GameState --> GameTree +GameState --> GameMove: Current move +GameTree *--> GameMove +GameMove -> GameMove + +@enduml diff --git a/doc/diagrams/gtpEngine.puml b/doc/diagrams/gtpEngine.puml new file mode 100644 index 0000000..c4caf32 --- /dev/null +++ b/doc/diagrams/gtpEngine.puml @@ -0,0 +1,29 @@ +@startuml + +!include skinparams.puml + +class EngineCore { +} + +class IO { + processComand() +} + +!include GameState.pumlc + +'class EngineBoard { +' setSize() +' setKomi() +' play() +' undo() +'} + +class EngineAI { + genmove(board) +} + +EngineCore --> IO +EngineCore --> GameState +EngineCore --> EngineAI + +@enduml diff --git a/doc/diagrams/modules.puml b/doc/diagrams/modules.puml new file mode 100644 index 0000000..064be1d --- /dev/null +++ b/doc/diagrams/modules.puml @@ -0,0 +1,9 @@ +@startuml + +!include ./skinparams.puml + +!include GameState.pumlc +!include SGF.pumlc +!include MoveParser.pumlc + +@enduml diff --git a/doc/diagrams/sgfModule.puml b/doc/diagrams/sgfModule.puml new file mode 100644 index 0000000..c8b51cd --- /dev/null +++ b/doc/diagrams/sgfModule.puml @@ -0,0 +1,17 @@ +@startuml + +!include ./skinparams.puml + +package "SGF" { + !include sgflex.pumlc + !include sgfyacc.pumlc + !include ASTNode.pumlc +} + +!include GameTree.pumlc + +sgflex <- sgfyacc +sgfyacc -> "*" ASTNode +ASTNode "1" -> "1" GameTree + +@enduml diff --git a/doc/diagrams/sgflex.pumlc b/doc/diagrams/sgflex.pumlc new file mode 100644 index 0000000..9b98885 --- /dev/null +++ b/doc/diagrams/sgflex.pumlc @@ -0,0 +1,8 @@ +@startuml + +object sgflex { + input() + token() +} + +@enduml diff --git a/doc/diagrams/sgfyacc.pumlc b/doc/diagrams/sgfyacc.pumlc new file mode 100644 index 0000000..72a2f3f --- /dev/null +++ b/doc/diagrams/sgfyacc.pumlc @@ -0,0 +1,8 @@ +@startuml + +object sgfyacc { + parse() +} + +@enduml + diff --git a/doc/diagrams/skinparams.puml b/doc/diagrams/skinparams.puml new file mode 100644 index 0000000..cde3da7 --- /dev/null +++ b/doc/diagrams/skinparams.puml @@ -0,0 +1,9 @@ +@startuml + +skinparam { + monochrome true + shadowing false + linetype polyline +} + +@enduml |