From d9b09855d3f367eb1eeab0a809f646d4eca201f0 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Sun, 14 Jan 2018 18:06:46 +0100 Subject: Implementing Wall controllers for a not committed test of GUI --- .../fr/umlv/java/wallj/controller/WallDisplayController.java | 9 +++++++-- .../fr/umlv/java/wallj/controller/WallPhysicsController.java | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/fr') 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 @@ package fr.umlv.java.wallj.controller; +import fr.umlv.java.wallj.board.TileVec2; import fr.umlv.java.wallj.context.Context; +import fr.umlv.java.wallj.context.GraphicsContext; import fr.umlv.java.wallj.event.Event; import fr.umlv.java.wallj.model.WallBlock; +import java.awt.*; +import java.util.Collections; import java.util.List; import java.util.Objects; @@ -18,8 +22,9 @@ public class WallDisplayController extends BlockController { @Override public List update(Context context) { - //TODO - return null; + GraphicsContext graphicsContext = context.getGraphicsContext(); + graphicsContext.paintRectangle(Color.GRAY,wall.getPos(), TileVec2.TILE_DIM,TileVec2.TILE_DIM); + return Collections.emptyList(); } } 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; import fr.umlv.java.wallj.event.Event; import fr.umlv.java.wallj.model.WallBlock; +import java.util.Collections; import java.util.List; import java.util.Objects; @@ -19,7 +20,7 @@ public class WallPhysicsController extends PhysicsController { @Override public List update(Context context) { //TODO - return null; + return Collections.emptyList(); } } -- cgit v1.2.3