From b5384f19db2e6211a3c8832b9dfcdca077873a39 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 4 Feb 2018 19:25:45 +0100 Subject: Little cleanup Signed-off-by: pacien --- src/main/java/fr/umlv/java/wallj/board/TileVec2.java | 8 -------- src/main/java/fr/umlv/java/wallj/context/Game.java | 6 ++---- src/main/java/fr/umlv/java/wallj/event/QuitGameOrder.java | 1 + src/main/java/fr/umlv/java/wallj/viewer/Main.java | 1 - 4 files changed, 3 insertions(+), 13 deletions(-) (limited to 'src/main/java/fr/umlv') diff --git a/src/main/java/fr/umlv/java/wallj/board/TileVec2.java b/src/main/java/fr/umlv/java/wallj/board/TileVec2.java index 4165c81..26deb0c 100644 --- a/src/main/java/fr/umlv/java/wallj/board/TileVec2.java +++ b/src/main/java/fr/umlv/java/wallj/board/TileVec2.java @@ -89,12 +89,4 @@ public final class TileVec2 { public int hashCode() { return Objects.hash(col, row); } - - @Override - public String toString() { - return "TileVec2{" + - "col=" + col + - ", row=" + row + - '}'; - } } 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 79f00bd..b78bae4 100644 --- a/src/main/java/fr/umlv/java/wallj/context/Game.java +++ b/src/main/java/fr/umlv/java/wallj/context/Game.java @@ -79,13 +79,14 @@ public final class Game implements Updateable { currentStage = new Stage(currentStage.getBoard()); } - private void goToNext(){ + private void goToNext() { if (hasNextBoard()) { //continue nextStage(); return; } setOver(); } + private void handleEvents(Context context) { if (Events.findFirst(context.getEvents(), QuitGameOrder.class).isPresent()) { context.getGame().setOver(); @@ -100,7 +101,6 @@ public final class Game implements Updateable { } } - /** * @param context the current context * @return a list of new events @@ -110,6 +110,4 @@ public final class Game implements Updateable { handleEvents(context); return currentStage.update(context); } - - } diff --git a/src/main/java/fr/umlv/java/wallj/event/QuitGameOrder.java b/src/main/java/fr/umlv/java/wallj/event/QuitGameOrder.java index 2cabac1..4e28de8 100644 --- a/src/main/java/fr/umlv/java/wallj/event/QuitGameOrder.java +++ b/src/main/java/fr/umlv/java/wallj/event/QuitGameOrder.java @@ -6,4 +6,5 @@ package fr.umlv.java.wallj.event; * @author Pacien TRAN-GIRARD */ public final class QuitGameOrder implements InputEvent { + // void } diff --git a/src/main/java/fr/umlv/java/wallj/viewer/Main.java b/src/main/java/fr/umlv/java/wallj/viewer/Main.java index 291ad58..d2b041e 100644 --- a/src/main/java/fr/umlv/java/wallj/viewer/Main.java +++ b/src/main/java/fr/umlv/java/wallj/viewer/Main.java @@ -14,7 +14,6 @@ import java.util.*; import java.util.List; public class Main { - private static final String DEFAULT_MAP_NAME = "/maps/level0.txt"; private static FileSystem fileSystemForContext(URI uri) throws URISyntaxException, IOException { -- cgit v1.2.3