diff options
author | pacien | 2018-01-08 15:28:07 +0100 |
---|---|---|
committer | pacien | 2018-01-08 15:28:07 +0100 |
commit | cb7f03b231218f7cc4a645d45f069ab7962b3c8b (patch) | |
tree | a149ed350e50a9161bcac77ac90649d594701eae /src | |
parent | 6781889388164d34749fb6eb05d3b4a5ed74aa1d (diff) | |
download | wallj-cb7f03b231218f7cc4a645d45f069ab7962b3c8b.tar.gz |
Add game event to class diagram
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/docs/class.puml | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/docs/class.puml b/src/docs/class.puml index 754ddbe..ab5cd30 100644 --- a/src/docs/class.puml +++ b/src/docs/class.puml | |||
@@ -55,15 +55,23 @@ package context { | |||
55 | package event { | 55 | package event { |
56 | interface Event | 56 | interface Event |
57 | 57 | ||
58 | class DropBombEvent implements Event { | 58 | interface InputEvent implements Event |
59 | interface GameEvent implements Event | ||
60 | |||
61 | class DropBombEvent implements InputEvent { | ||
59 | DropBombEvent(TileVec2) | 62 | DropBombEvent(TileVec2) |
60 | } | 63 | } |
61 | 64 | ||
62 | class MoveRobotEvent implements Event { | 65 | class MoveRobotEvent implements InputEvent { |
63 | MoveRobotEvent(TileVec2) | 66 | MoveRobotEvent(TileVec2) |
64 | } | 67 | } |
65 | 68 | ||
66 | class ConfirmEvent implements Event | 69 | class ConfirmEvent implements InputEvent |
70 | |||
71 | class ExplosionEvent implements GameEvent { | ||
72 | Block source | ||
73 | Body source | ||
74 | } | ||
67 | } | 75 | } |
68 | 76 | ||
69 | package board { | 77 | package board { |
@@ -116,7 +124,7 @@ package model { | |||
116 | Block(Vec2) | 124 | Block(Vec2) |
117 | Vec2 getPosition() | 125 | Vec2 getPosition() |
118 | void setPosition(Vec2) | 126 | void setPosition(Vec2) |
119 | void update(Context) | 127 | List<Event> update(Context) |
120 | } | 128 | } |
121 | 129 | ||
122 | abstract class StaticBlock extends Block | 130 | abstract class StaticBlock extends Block |
@@ -132,21 +140,20 @@ package model { | |||
132 | List<Block> | 140 | List<Block> |
133 | Stage(Board) | 141 | Stage(Board) |
134 | List<Block> getBlocks() | 142 | List<Block> getBlocks() |
135 | void update(Context) | 143 | List<Event> update(Context) |
136 | bool isCleared() | 144 | bool isCleared() |
137 | } | 145 | } |
138 | } | 146 | } |
139 | 147 | ||
140 | package controller { | 148 | package controller { |
141 | interface Controller { | 149 | interface Controller { |
142 | void update(Context) | 150 | List<Event> update(Context) |
143 | } | 151 | } |
144 | 152 | ||
145 | abstract class BlockController implements Controller { | 153 | abstract class BlockController implements Controller { |
146 | Block | 154 | Block |
147 | Controller(Block) | 155 | Controller(Block) |
148 | Block getBlock() | 156 | Block getBlock() |
149 | void update(Context) | ||
150 | } | 157 | } |
151 | 158 | ||
152 | class BlockControllerFactory { | 159 | class BlockControllerFactory { |