diff options
author | Adam NAILI | 2018-01-14 18:06:46 +0100 |
---|---|---|
committer | Adam NAILI | 2018-01-14 18:06:46 +0100 |
commit | d9b09855d3f367eb1eeab0a809f646d4eca201f0 (patch) | |
tree | 3c30314b369df091911019dfab3e0c3d0100f184 /src/main/java/fr | |
parent | cbab6f20fe6cd2eaa8ae41c815612a32db3b11bb (diff) | |
download | wallj-d9b09855d3f367eb1eeab0a809f646d4eca201f0.tar.gz |
Implementing Wall controllers for a not committed test of GUI
Diffstat (limited to 'src/main/java/fr')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/controller/WallDisplayController.java | 9 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/controller/WallPhysicsController.java | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/controller/WallDisplayController.java b/src/main/java/fr/umlv/java/wallj/controller/WallDisplayController.java index 3700acb..7b7011c 100644 --- a/src/main/java/fr/umlv/java/wallj/controller/WallDisplayController.java +++ b/src/main/java/fr/umlv/java/wallj/controller/WallDisplayController.java | |||
@@ -1,9 +1,13 @@ | |||
1 | package fr.umlv.java.wallj.controller; | 1 | package fr.umlv.java.wallj.controller; |
2 | 2 | ||
3 | import fr.umlv.java.wallj.board.TileVec2; | ||
3 | import fr.umlv.java.wallj.context.Context; | 4 | import fr.umlv.java.wallj.context.Context; |
5 | import fr.umlv.java.wallj.context.GraphicsContext; | ||
4 | import fr.umlv.java.wallj.event.Event; | 6 | import fr.umlv.java.wallj.event.Event; |
5 | import fr.umlv.java.wallj.model.WallBlock; | 7 | import fr.umlv.java.wallj.model.WallBlock; |
6 | 8 | ||
9 | import java.awt.*; | ||
10 | import java.util.Collections; | ||
7 | import java.util.List; | 11 | import java.util.List; |
8 | import java.util.Objects; | 12 | import java.util.Objects; |
9 | 13 | ||
@@ -18,8 +22,9 @@ public class WallDisplayController extends BlockController { | |||
18 | 22 | ||
19 | @Override | 23 | @Override |
20 | public List<Event> update(Context context) { | 24 | public List<Event> update(Context context) { |
21 | //TODO | 25 | GraphicsContext graphicsContext = context.getGraphicsContext(); |
22 | return null; | 26 | graphicsContext.paintRectangle(Color.GRAY,wall.getPos(), TileVec2.TILE_DIM,TileVec2.TILE_DIM); |
27 | return Collections.emptyList(); | ||
23 | } | 28 | } |
24 | 29 | ||
25 | } | 30 | } |
diff --git a/src/main/java/fr/umlv/java/wallj/controller/WallPhysicsController.java b/src/main/java/fr/umlv/java/wallj/controller/WallPhysicsController.java index 146ca34..3fb00bb 100644 --- a/src/main/java/fr/umlv/java/wallj/controller/WallPhysicsController.java +++ b/src/main/java/fr/umlv/java/wallj/controller/WallPhysicsController.java | |||
@@ -4,6 +4,7 @@ import fr.umlv.java.wallj.context.Context; | |||
4 | import fr.umlv.java.wallj.event.Event; | 4 | import fr.umlv.java.wallj.event.Event; |
5 | import fr.umlv.java.wallj.model.WallBlock; | 5 | import fr.umlv.java.wallj.model.WallBlock; |
6 | 6 | ||
7 | import java.util.Collections; | ||
7 | import java.util.List; | 8 | import java.util.List; |
8 | import java.util.Objects; | 9 | import java.util.Objects; |
9 | 10 | ||
@@ -19,7 +20,7 @@ public class WallPhysicsController extends PhysicsController { | |||
19 | @Override | 20 | @Override |
20 | public List<Event> update(Context context) { | 21 | public List<Event> update(Context context) { |
21 | //TODO | 22 | //TODO |
22 | return null; | 23 | return Collections.emptyList(); |
23 | } | 24 | } |
24 | 25 | ||
25 | } | 26 | } |