aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/fr
diff options
context:
space:
mode:
authorpacien2018-02-01 12:25:04 +0100
committerpacien2018-02-01 12:25:04 +0100
commit48902d6696e40cb100c86fa83b131b4b7a016f52 (patch)
tree54294daafa9332a434fe5b50df17157ee8fc3aef /src/main/java/fr
parent5c27749c76d59e2299c67b4676426905c2a17544 (diff)
downloadwallj-48902d6696e40cb100c86fa83b131b4b7a016f52.tar.gz
Rename GameController and update class diagram
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src/main/java/fr')
-rw-r--r--src/main/java/fr/umlv/java/wallj/context/Game.java4
-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
2 files changed, 3 insertions, 3 deletions
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
3import fr.umlv.java.wallj.board.Board; 3import fr.umlv.java.wallj.board.Board;
4import fr.umlv.java.wallj.controller.Controller; 4import fr.umlv.java.wallj.controller.Controller;
5import fr.umlv.java.wallj.controller.GameController; 5import fr.umlv.java.wallj.controller.GameStateController;
6import fr.umlv.java.wallj.event.Event; 6import fr.umlv.java.wallj.event.Event;
7import fr.umlv.java.wallj.block.Stage; 7import 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;
9import java.util.LinkedList; 9import java.util.LinkedList;
10import java.util.List; 10import java.util.List;
11 11
12public class GameController implements Controller { 12public class GameStateController implements Controller {
13 13
14 @Override 14 @Override
15 public List<Event> update(Context context) { 15 public List<Event> update(Context context) {