diff options
author | pacien | 2018-02-02 11:14:22 +0100 |
---|---|---|
committer | pacien | 2018-02-02 11:14:22 +0100 |
commit | 4a8ec2f7fac9bc50ddceb49ce6f71db2fabbb2d1 (patch) | |
tree | 7277644c5630652b8caa136bf981e6f4f90ad1d4 | |
parent | 726a4ba8047be847e0bc3af7b376f41d2760b635 (diff) | |
download | wallj-4a8ec2f7fac9bc50ddceb49ce6f71db2fabbb2d1.tar.gz |
Update class diagram
Signed-off-by: pacien <pacien.trangirard@pacien.net>
-rw-r--r-- | src/docs/class.puml | 71 |
1 files changed, 28 insertions, 43 deletions
diff --git a/src/docs/class.puml b/src/docs/class.puml index 075aa39..5c95e18 100644 --- a/src/docs/class.puml +++ b/src/docs/class.puml | |||
@@ -4,16 +4,30 @@ skinparam linetype ortho | |||
4 | skinparam monochrome reverse | 4 | skinparam monochrome reverse |
5 | skinparam backgroundColor #FFFFFF | 5 | skinparam backgroundColor #FFFFFF |
6 | 6 | ||
7 | class Main{ | ||
8 | static void main(String[]) | ||
9 | } | ||
10 | |||
11 | package viewer { | 7 | package viewer { |
12 | class Viewer { | 8 | class Viewer { |
13 | final Game | 9 | final Game |
14 | Viewer(List<Board>) | 10 | Viewer(List<Board>) |
15 | void eventLoop(ApplicationContext) | 11 | void eventLoop(ApplicationContext) |
16 | } | 12 | } |
13 | |||
14 | class InputHandler { | ||
15 | ApplicationContext | ||
16 | |||
17 | InputHandler(ApplicationContext) | ||
18 | List<Event> getEvents() | ||
19 | } | ||
20 | |||
21 | class ScreenManager { | ||
22 | ApplicationContext, Graphics2D | ||
23 | |||
24 | ScreenManager(ApplicationContext,Graphics2D) | ||
25 | GraphicsContext clearScreen() | ||
26 | } | ||
27 | |||
28 | class Main{ | ||
29 | static void main(String[]) | ||
30 | } | ||
17 | } | 31 | } |
18 | 32 | ||
19 | package context { | 33 | package context { |
@@ -38,20 +52,6 @@ package context { | |||
38 | paintString(Color, Vec2,String) | 52 | paintString(Color, Vec2,String) |
39 | } | 53 | } |
40 | 54 | ||
41 | class InputHandler { | ||
42 | ApplicationContext | ||
43 | |||
44 | InputHandler(ApplicationContext) | ||
45 | List<Event> getEvents() | ||
46 | } | ||
47 | |||
48 | class ScreenManager { | ||
49 | ApplicationContext, Graphics2D | ||
50 | |||
51 | ScreenManager(ApplicationContext,Graphics2D) | ||
52 | GraphicsContext clearScreen() | ||
53 | } | ||
54 | |||
55 | class Game implements Updateable { | 55 | class Game implements Updateable { |
56 | Stage | 56 | Stage |
57 | final List<Controller> | 57 | final List<Controller> |
@@ -65,7 +65,7 @@ package context { | |||
65 | void setOver() | 65 | void setOver() |
66 | void nextStage() | 66 | void nextStage() |
67 | void retryStage() | 67 | void retryStage() |
68 | List<Event> update(Context context) | 68 | List<Event> update(Context) |
69 | } | 69 | } |
70 | 70 | ||
71 | class Stage implements Updateable { | 71 | class Stage implements Updateable { |
@@ -102,6 +102,10 @@ package event { | |||
102 | Block source | 102 | Block source |
103 | Body source | 103 | Body source |
104 | } | 104 | } |
105 | |||
106 | class StageClearedEvent implements GameEvent | ||
107 | class BlockCreateEvent implements GameEvent | ||
108 | class BlockDestroyEvent implements GameEvent | ||
105 | } | 109 | } |
106 | 110 | ||
107 | package board { | 111 | package board { |
@@ -182,43 +186,24 @@ package block { | |||
182 | class RobotBlock extends Block { | 186 | class RobotBlock extends Block { |
183 | Vec2 getPos() | 187 | Vec2 getPos() |
184 | void link(World world) | 188 | void link(World world) |
185 | List<Event> update(Context context) | 189 | List<Event> update(Context) |
186 | } | 190 | } |
187 | 191 | ||
188 | class WallBlock extends JBoxBlock { | 192 | class WallBlock extends JBoxBlock { |
189 | List<Event> update(Context context) | 193 | List<Event> update(Context) |
190 | } | 194 | } |
191 | 195 | ||
192 | class TrashBlock extends JBoxBlock { | 196 | class TrashBlock extends JBoxBlock { |
193 | List<Event> update(Context context) | 197 | List<Event> update(Context) |
194 | } | 198 | } |
195 | 199 | ||
196 | class BombBlock extends JBoxBlock { | 200 | class BombBlock extends JBoxBlock { |
197 | List<Event> update(Context context) | 201 | List<Event> update(Context) |
198 | } | 202 | } |
199 | 203 | ||
200 | class GarbageBlock extends JBoxBlock { | 204 | class GarbageBlock extends JBoxBlock { |
201 | List<Event> update(Context context) | 205 | List<Event> update(Context) |
202 | } | 206 | } |
203 | } | 207 | } |
204 | 208 | ||
205 | package controller { | ||
206 | interface Controller extends Updateable | ||
207 | |||
208 | class GameStateController implements Controller | ||
209 | } | ||
210 | |||
211 | Zen5 ()-- Viewer | ||
212 | Zen5 ()-- Main | ||
213 | Main --> viewer | ||
214 | |||
215 | viewer --> context | ||
216 | viewer --> block | ||
217 | |||
218 | context --> event | ||
219 | |||
220 | block --> controller | ||
221 | |||
222 | board --> block | ||
223 | |||
224 | @enduml | 209 | @enduml |