aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/fr/umlv
diff options
context:
space:
mode:
authorpacien2018-02-04 21:34:12 +0100
committerpacien2018-02-04 21:34:12 +0100
commitfbaba931804b6ad4b5b9668afbcd1809266682b0 (patch)
tree96bf2f1b3d97b32a1099a38c6bcbba4850902a84 /src/main/java/fr/umlv
parent2fc051711ab7edb2677d619bfffe526c81ef9d4f (diff)
downloadwallj-fbaba931804b6ad4b5b9668afbcd1809266682b0.tar.gz
Move background color property
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src/main/java/fr/umlv')
-rw-r--r--src/main/java/fr/umlv/java/wallj/viewer/Main.java3
-rw-r--r--src/main/java/fr/umlv/java/wallj/viewer/Viewer.java2
2 files changed, 3 insertions, 2 deletions
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 9e138a8..4483069 100644
--- a/src/main/java/fr/umlv/java/wallj/viewer/Main.java
+++ b/src/main/java/fr/umlv/java/wallj/viewer/Main.java
@@ -5,7 +5,6 @@ import fr.umlv.java.wallj.board.BoardParser;
5import fr.umlv.java.wallj.board.BoardValidator; 5import fr.umlv.java.wallj.board.BoardValidator;
6import fr.umlv.zen5.Application; 6import fr.umlv.zen5.Application;
7 7
8import java.awt.*;
9import java.io.IOException; 8import java.io.IOException;
10import java.net.URI; 9import java.net.URI;
11import java.net.URISyntaxException; 10import java.net.URISyntaxException;
@@ -85,7 +84,7 @@ public final class Main {
85 .collect(Collectors.toList()); 84 .collect(Collectors.toList());
86 85
87 Viewer viewer = new Viewer(levels); 86 Viewer viewer = new Viewer(levels);
88 Application.run(Color.WHITE, viewer::eventLoop); 87 Application.run(Viewer.BACKGROUND_COLOR, viewer::eventLoop);
89 } 88 }
90 89
91 private Main() { 90 private Main() {
diff --git a/src/main/java/fr/umlv/java/wallj/viewer/Viewer.java b/src/main/java/fr/umlv/java/wallj/viewer/Viewer.java
index 5a7d869..b9686b0 100644
--- a/src/main/java/fr/umlv/java/wallj/viewer/Viewer.java
+++ b/src/main/java/fr/umlv/java/wallj/viewer/Viewer.java
@@ -6,6 +6,7 @@ import fr.umlv.java.wallj.context.Game;
6import fr.umlv.java.wallj.event.Event; 6import fr.umlv.java.wallj.event.Event;
7import fr.umlv.zen5.ApplicationContext; 7import fr.umlv.zen5.ApplicationContext;
8 8
9import java.awt.*;
9import java.time.Duration; 10import java.time.Duration;
10import java.util.LinkedList; 11import java.util.LinkedList;
11import java.util.List; 12import java.util.List;
@@ -18,6 +19,7 @@ import java.util.stream.Collectors;
18 * @author Adam NAILI 19 * @author Adam NAILI
19 */ 20 */
20public final class Viewer { 21public final class Viewer {
22 public static final Color BACKGROUND_COLOR = Color.WHITE;
21 private static final Duration FRAME_DURATION = Duration.ofMillis(1000 / 60); 23 private static final Duration FRAME_DURATION = Duration.ofMillis(1000 / 60);
22 24
23 private final Game currentGame; 25 private final Game currentGame;