diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/Main.java | 1 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java | 3 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/viewer/Viewer.java | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/Main.java b/src/main/java/fr/umlv/java/wallj/Main.java index 37a99b0..5f0ca99 100644 --- a/src/main/java/fr/umlv/java/wallj/Main.java +++ b/src/main/java/fr/umlv/java/wallj/Main.java | |||
@@ -32,6 +32,7 @@ public class Main { | |||
32 | return paths; | 32 | return paths; |
33 | } | 33 | } |
34 | 34 | ||
35 | // TODO: use System.getProperty("levels") to get the path to the level directory | ||
35 | public static void main(String[] args) { | 36 | public static void main(String[] args) { |
36 | List<Board> boards = new LinkedList<>(); | 37 | List<Board> boards = new LinkedList<>(); |
37 | try { | 38 | try { |
diff --git a/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java b/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java index 55f0440..3c6b08e 100644 --- a/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java +++ b/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java | |||
@@ -10,6 +10,9 @@ import java.time.Duration; | |||
10 | public class StopWatch { | 10 | public class StopWatch { |
11 | private long startTime = System.currentTimeMillis(); | 11 | private long startTime = System.currentTimeMillis(); |
12 | 12 | ||
13 | /** | ||
14 | * @return the duration since the creation of the stopwatch | ||
15 | */ | ||
13 | public Duration peek() { | 16 | public Duration peek() { |
14 | return Duration.ofMillis(System.currentTimeMillis() - startTime); | 17 | return Duration.ofMillis(System.currentTimeMillis() - startTime); |
15 | } | 18 | } |
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 0fee046..430bff7 100644 --- a/src/main/java/fr/umlv/java/wallj/viewer/Viewer.java +++ b/src/main/java/fr/umlv/java/wallj/viewer/Viewer.java | |||
@@ -28,7 +28,7 @@ import java.util.Objects; | |||
28 | * @author Adam NAILI | 28 | * @author Adam NAILI |
29 | */ | 29 | */ |
30 | public final class Viewer { | 30 | public final class Viewer { |
31 | private static final Duration FRAME_DURATION = Duration.ofMillis((long) 1000.0 / 60); | 31 | private static final Duration FRAME_DURATION = Duration.ofMillis(1000 / 60); |
32 | 32 | ||
33 | private final Game currentGame; | 33 | private final Game currentGame; |
34 | 34 | ||