aboutsummaryrefslogtreecommitdiff
path: root/src/docs/class.puml
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/class.puml')
-rw-r--r--src/docs/class.puml33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/docs/class.puml b/src/docs/class.puml
index 869a707..6a527ae 100644
--- a/src/docs/class.puml
+++ b/src/docs/class.puml
@@ -12,20 +12,23 @@ package utils {
12 12
13package viewer { 13package viewer {
14 class Viewer { 14 class Viewer {
15 Game 15 final Game
16 Stage 16 Viewer(List<Board>)
17 void main(String[]) 17 void main(String[])
18 void eventLoop(ApplicationContext) 18 void eventLoop(ApplicationContext)
19 void renderFrame(Graphics2D,ApplicationContext) 19 void renderFrame(Graphics2D,ApplicationContext,List<Event>)
20 } 20 }
21} 21}
22 22
23package context { 23package context {
24 class Context { 24 class Context {
25 Context(Stage,List<Event>,GraphicsContext) 25 Context(Game,List<Event>,GraphicsContext)
26 final Stage 26 final Game
27 final List<Event> 27 final List<Event>
28 final GraphicsContext 28 final GraphicsContext
29 Game getGame()
30 List<Event> getEvents()
31 GraphicsContext getGraphicsContext()
29 } 32 }
30 33
31 class GraphicsContext { 34 class GraphicsContext {
@@ -49,10 +52,18 @@ package context {
49 } 52 }
50 53
51 class Game { 54 class Game {
52 final GameController 55 Stage
53 int index 56 final List<Controller>
57 int indexBoard
54 final List<Board> 58 final List<Board>
55 Game(GameController,List<Board>) 59 bool over
60 Game(List<Board>)
61 Stage getStage()
62 bool isOver()
63 void setOver()
64 void nextStage()
65 void retryStage()
66 List<Event> update(Context context)
56 } 67 }
57} 68}
58 69
@@ -77,6 +88,8 @@ package event {
77 } 88 }
78 89
79 class ConfirmEvent implements InputEvent 90 class ConfirmEvent implements InputEvent
91 class GameOverEvent implements Event
92
80 93
81 class ExplosionEvent implements GameEvent { 94 class ExplosionEvent implements GameEvent {
82 Block source 95 Block source
@@ -157,8 +170,8 @@ package model {
157 class RobotBlock extends Block 170 class RobotBlock extends Block
158 171
159 class Stage { 172 class Stage {
160 StageController
161 List<Block> 173 List<Block>
174 Board
162 Stage(Board) 175 Stage(Board)
163 List<Block> getBlocks() 176 List<Block> getBlocks()
164 List<Event> update(Context) 177 List<Event> update(Context)
@@ -179,9 +192,7 @@ package controller {
179 class BlockControllerFactory { 192 class BlockControllerFactory {
180 BlockController build(Block) 193 BlockController build(Block)
181 } 194 }
182
183 class GameController implements Controller 195 class GameController implements Controller
184 class StageController implements Controller
185 196
186 abstract class PhysicsController extends BlockController 197 abstract class PhysicsController extends BlockController
187 abstract class DisplayController extends BlockController 198 abstract class DisplayController extends BlockController