diff options
author | pacien | 2018-02-01 12:25:04 +0100 |
---|---|---|
committer | pacien | 2018-02-01 12:25:04 +0100 |
commit | 48902d6696e40cb100c86fa83b131b4b7a016f52 (patch) | |
tree | 54294daafa9332a434fe5b50df17157ee8fc3aef | |
parent | 5c27749c76d59e2299c67b4676426905c2a17544 (diff) | |
download | wallj-48902d6696e40cb100c86fa83b131b4b7a016f52.tar.gz |
Rename GameController and update class diagram
Signed-off-by: pacien <pacien.trangirard@pacien.net>
-rw-r--r-- | src/docs/class.puml | 6 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/context/Game.java | 4 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/controller/GameStateController.java (renamed from src/main/java/fr/umlv/java/wallj/controller/GameController.java) | 2 | ||||
-rw-r--r-- | src/main/resources/.gitkeep | 0 | ||||
-rw-r--r-- | src/test/java/fr/umlv/java/wallj/.gitkeep | 0 | ||||
-rw-r--r-- | src/test/resources/.gitkeep | 0 |
6 files changed, 5 insertions, 7 deletions
diff --git a/src/docs/class.puml b/src/docs/class.puml index dbfb731..b404102 100644 --- a/src/docs/class.puml +++ b/src/docs/class.puml | |||
@@ -25,12 +25,10 @@ package viewer { | |||
25 | package context { | 25 | package context { |
26 | class Context { | 26 | class Context { |
27 | Context(Game,List<Event>,GraphicsContext) | 27 | Context(Game,List<Event>,GraphicsContext) |
28 | final Game | ||
29 | final List<Event> | ||
30 | final GraphicsContext | ||
31 | Game getGame() | 28 | Game getGame() |
32 | List<Event> getEvents() | 29 | List<Event> getEvents() |
33 | GraphicsContext getGraphicsContext() | 30 | GraphicsContext getGraphicsContext() |
31 | Duration getTimeDelta() | ||
34 | } | 32 | } |
35 | 33 | ||
36 | class GraphicsContext { | 34 | class GraphicsContext { |
@@ -205,7 +203,7 @@ package controller { | |||
205 | class BlockControllerFactory { | 203 | class BlockControllerFactory { |
206 | BlockController build(Block) | 204 | BlockController build(Block) |
207 | } | 205 | } |
208 | class GameController implements Controller | 206 | class GameStateController implements Controller |
209 | 207 | ||
210 | abstract class PhysicsController extends BlockController | 208 | abstract class PhysicsController extends BlockController |
211 | abstract class DisplayController extends BlockController | 209 | abstract class DisplayController extends BlockController |
diff --git a/src/main/java/fr/umlv/java/wallj/context/Game.java b/src/main/java/fr/umlv/java/wallj/context/Game.java index d5f9873..6bc63ae 100644 --- a/src/main/java/fr/umlv/java/wallj/context/Game.java +++ b/src/main/java/fr/umlv/java/wallj/context/Game.java | |||
@@ -2,7 +2,7 @@ package fr.umlv.java.wallj.context; | |||
2 | 2 | ||
3 | import fr.umlv.java.wallj.board.Board; | 3 | import fr.umlv.java.wallj.board.Board; |
4 | import fr.umlv.java.wallj.controller.Controller; | 4 | import fr.umlv.java.wallj.controller.Controller; |
5 | import fr.umlv.java.wallj.controller.GameController; | 5 | import fr.umlv.java.wallj.controller.GameStateController; |
6 | import fr.umlv.java.wallj.event.Event; | 6 | import fr.umlv.java.wallj.event.Event; |
7 | import fr.umlv.java.wallj.block.Stage; | 7 | import fr.umlv.java.wallj.block.Stage; |
8 | 8 | ||
@@ -25,7 +25,7 @@ public final class Game { | |||
25 | */ | 25 | */ |
26 | public Game(List<Board> boards) { | 26 | public Game(List<Board> boards) { |
27 | this.controllers = new LinkedList<>(); | 27 | this.controllers = new LinkedList<>(); |
28 | this.controllers.add(new GameController()); | 28 | this.controllers.add(new GameStateController()); |
29 | Objects.requireNonNull(boards); | 29 | Objects.requireNonNull(boards); |
30 | if (boards.isEmpty()) { | 30 | if (boards.isEmpty()) { |
31 | throw new IllegalArgumentException("The list of boards is empty, not able to create a correct game from this."); | 31 | throw new IllegalArgumentException("The list of boards is empty, not able to create a correct game from this."); |
diff --git a/src/main/java/fr/umlv/java/wallj/controller/GameController.java b/src/main/java/fr/umlv/java/wallj/controller/GameStateController.java index 456793a..2c548f2 100644 --- a/src/main/java/fr/umlv/java/wallj/controller/GameController.java +++ b/src/main/java/fr/umlv/java/wallj/controller/GameStateController.java | |||
@@ -9,7 +9,7 @@ import fr.umlv.java.wallj.event.GameOverEvent; | |||
9 | import java.util.LinkedList; | 9 | import java.util.LinkedList; |
10 | import java.util.List; | 10 | import java.util.List; |
11 | 11 | ||
12 | public class GameController implements Controller { | 12 | public class GameStateController implements Controller { |
13 | 13 | ||
14 | @Override | 14 | @Override |
15 | public List<Event> update(Context context) { | 15 | public List<Event> update(Context context) { |
diff --git a/src/main/resources/.gitkeep b/src/main/resources/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/src/main/resources/.gitkeep +++ /dev/null | |||
diff --git a/src/test/java/fr/umlv/java/wallj/.gitkeep b/src/test/java/fr/umlv/java/wallj/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/src/test/java/fr/umlv/java/wallj/.gitkeep +++ /dev/null | |||
diff --git a/src/test/resources/.gitkeep b/src/test/resources/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/src/test/resources/.gitkeep +++ /dev/null | |||