diff options
author | pacien | 2018-02-04 21:34:12 +0100 |
---|---|---|
committer | pacien | 2018-02-04 21:34:12 +0100 |
commit | fbaba931804b6ad4b5b9668afbcd1809266682b0 (patch) | |
tree | 96bf2f1b3d97b32a1099a38c6bcbba4850902a84 /src/main/java/fr/umlv | |
parent | 2fc051711ab7edb2677d619bfffe526c81ef9d4f (diff) | |
download | wallj-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.java | 3 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/viewer/Viewer.java | 2 |
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; | |||
5 | import fr.umlv.java.wallj.board.BoardValidator; | 5 | import fr.umlv.java.wallj.board.BoardValidator; |
6 | import fr.umlv.zen5.Application; | 6 | import fr.umlv.zen5.Application; |
7 | 7 | ||
8 | import java.awt.*; | ||
9 | import java.io.IOException; | 8 | import java.io.IOException; |
10 | import java.net.URI; | 9 | import java.net.URI; |
11 | import java.net.URISyntaxException; | 10 | import 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; | |||
6 | import fr.umlv.java.wallj.event.Event; | 6 | import fr.umlv.java.wallj.event.Event; |
7 | import fr.umlv.zen5.ApplicationContext; | 7 | import fr.umlv.zen5.ApplicationContext; |
8 | 8 | ||
9 | import java.awt.*; | ||
9 | import java.time.Duration; | 10 | import java.time.Duration; |
10 | import java.util.LinkedList; | 11 | import java.util.LinkedList; |
11 | import java.util.List; | 12 | import java.util.List; |
@@ -18,6 +19,7 @@ import java.util.stream.Collectors; | |||
18 | * @author Adam NAILI | 19 | * @author Adam NAILI |
19 | */ | 20 | */ |
20 | public final class Viewer { | 21 | public 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; |