diff options
author | Adam NAILI | 2018-02-04 13:01:38 +0100 |
---|---|---|
committer | Adam NAILI | 2018-02-04 13:01:38 +0100 |
commit | 846b53290847887bc8e5a199986f9f8a95d20418 (patch) | |
tree | 216a24086f6c242c453efe3c89f70fcfc9dd9d90 | |
parent | 19c7eabf537e5805be25454e241d138d306ca2f3 (diff) | |
parent | d214d357ff0b03205ba9a8d753c93c9fa17094f3 (diff) | |
download | wallj-846b53290847887bc8e5a199986f9f8a95d20418.tar.gz |
Merge branch 'master' of https://github.com/pacien/upem-java-wallj
-rw-r--r-- | src/docs/class.puml | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/docs/class.puml b/src/docs/class.puml index d8c6e81..1aede6c 100644 --- a/src/docs/class.puml +++ b/src/docs/class.puml | |||
@@ -32,8 +32,12 @@ package viewer { | |||
32 | 32 | ||
33 | package context { | 33 | package context { |
34 | interface Updateable { | 34 | interface Updateable { |
35 | List<Event> update(Context) | 35 | Stream<Event> update(Context) |
36 | static List<Event> updateAll(List<Updateable>, Context) | 36 | } |
37 | |||
38 | class Updateables { | ||
39 | static Stream<Event> updateAll(Context, List<Updateable>) | ||
40 | static Stream<Event> updateAll(Context, Updateable...) | ||
37 | } | 41 | } |
38 | 42 | ||
39 | class Context { | 43 | class Context { |
@@ -65,19 +69,24 @@ package context { | |||
65 | void setOver() | 69 | void setOver() |
66 | void nextStage() | 70 | void nextStage() |
67 | void retryStage() | 71 | void retryStage() |
68 | List<Event> update(Context) | 72 | Stream<Event> update(Context) |
69 | } | 73 | } |
70 | 74 | ||
71 | class Stage implements Updateable { | 75 | class Stage implements Updateable { |
72 | Stage(Board) | 76 | Stage(Board) |
73 | Board getBoard() | 77 | Board getBoard() |
74 | List<Block> getBlocks() | 78 | List<Block> getBlocks() |
75 | List<Event> update(Context) | 79 | Stream<Event> update(Context) |
76 | bool isCleared() | 80 | bool isCleared() |
77 | } | 81 | } |
78 | } | 82 | } |
79 | 83 | ||
80 | package event { | 84 | package event { |
85 | class Events { | ||
86 | static <T extends Event> Stream<T> filter(List<Event>, Class<T>) | ||
87 | static <T extends Event> Optional<T> findFirst(List<Event>, Class<T>) | ||
88 | } | ||
89 | |||
81 | interface Event | 90 | interface Event |
82 | interface GameEvent implements Event | 91 | interface GameEvent implements Event |
83 | interface InputEvent implements Event | 92 | interface InputEvent implements Event |
@@ -183,23 +192,23 @@ package block { | |||
183 | class RobotBlock extends Block { | 192 | class RobotBlock extends Block { |
184 | Vec2 getPos() | 193 | Vec2 getPos() |
185 | void link(World world) | 194 | void link(World world) |
186 | List<Event> update(Context) | 195 | Stream<Event> update(Context) |
187 | } | 196 | } |
188 | 197 | ||
189 | class WallBlock extends JBoxBlock { | 198 | class WallBlock extends JBoxBlock { |
190 | List<Event> update(Context) | 199 | Stream<Event> update(Context) |
191 | } | 200 | } |
192 | 201 | ||
193 | class TrashBlock extends JBoxBlock { | 202 | class TrashBlock extends JBoxBlock { |
194 | List<Event> update(Context) | 203 | Stream<Event> update(Context) |
195 | } | 204 | } |
196 | 205 | ||
197 | class BombBlock extends JBoxBlock { | 206 | class BombBlock extends JBoxBlock { |
198 | List<Event> update(Context) | 207 | Stream<Event> update(Context) |
199 | } | 208 | } |
200 | 209 | ||
201 | class GarbageBlock extends JBoxBlock { | 210 | class GarbageBlock extends JBoxBlock { |
202 | List<Event> update(Context) | 211 | Stream<Event> update(Context) |
203 | } | 212 | } |
204 | } | 213 | } |
205 | 214 | ||