From 0117ee813dad9500aacaa3d6bd939444d55d271c Mon Sep 17 00:00:00 2001 From: dorianreineccius Date: Sat, 21 Dec 2019 10:51:57 +0100 Subject: [PATCH] javadoc --- src/main/java/com/treasure/hunt/game/GameEngine.java | 1 - src/main/java/com/treasure/hunt/game/GameManager.java | 9 ++++++--- .../game/mods/hideandseek/HideAndSeekGameEngine.java | 6 +++--- .../strategy/hider/impl/MaxAreaAngularHintStrategy.java | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/treasure/hunt/game/GameEngine.java b/src/main/java/com/treasure/hunt/game/GameEngine.java index 2d298885..eb294472 100644 --- a/src/main/java/com/treasure/hunt/game/GameEngine.java +++ b/src/main/java/com/treasure/hunt/game/GameEngine.java @@ -210,7 +210,6 @@ protected void verifyMovement(Movement movement, Point initialSearcherPosition) /** * TODO implement: - * AngleHints must be correct * AngleHints must be of angle [0, 180] !? * CircleHints must contain each other !? * Verifies whether the {@link Hint} {@code hint} given by the {@link Hider} followed the rules. diff --git a/src/main/java/com/treasure/hunt/game/GameManager.java b/src/main/java/com/treasure/hunt/game/GameManager.java index 6fc0b32a..c9adb41e 100644 --- a/src/main/java/com/treasure/hunt/game/GameManager.java +++ b/src/main/java/com/treasure/hunt/game/GameManager.java @@ -34,7 +34,10 @@ */ @Slf4j public class GameManager { - + /** + * A thread that is invoked by {@link GameManager#beat(ReadOnlyObjectProperty)} and stopped by {@link GameManager#stopBeat()}. + * He executes {@link GameManager#move(int)} in a given interval. + */ private Thread beatThread; @Getter @@ -220,7 +223,7 @@ public BooleanProperty getGameFinishedProperty() { } /** - * @return true if the shown step is the most up to date one + * @return {@code true}, if the shown step is the most up to date one. {@code false}, otherwise. */ public boolean latestStepViewed() { return moves.size() - 1 == viewIndex.get(); @@ -239,7 +242,7 @@ public BooleanBinding stepBackwardImpossibleBinding() { } /** - * @return true if the shown step is the first one + * @return {@code true}, if the shown step is the first one. {@code false}, otherwise. */ public boolean isFirstStepShown() { return stepBackwardImpossibleBinding().getValue(); diff --git a/src/main/java/com/treasure/hunt/game/mods/hideandseek/HideAndSeekGameEngine.java b/src/main/java/com/treasure/hunt/game/mods/hideandseek/HideAndSeekGameEngine.java index ad01f387..bacb68fd 100644 --- a/src/main/java/com/treasure/hunt/game/mods/hideandseek/HideAndSeekGameEngine.java +++ b/src/main/java/com/treasure/hunt/game/mods/hideandseek/HideAndSeekGameEngine.java @@ -7,7 +7,8 @@ /** * In this modification, the hider may reset the - * treasure location in each move. + * treasure location in each move, + * after the {@link Searcher} did his {@link com.treasure.hunt.strategy.searcher.Movement}. * * @author dorianreineccius */ @@ -18,8 +19,7 @@ public HideAndSeekGameEngine(Searcher searcher, Hider hider) { } /** - * In this modification, the {@link GameEngine#hider} can reset the treasure position - * and then gives his hint + * Let the {@link GameEngine#hider} reset the treasure position and give his {@link com.treasure.hunt.strategy.hint.Hint}. */ protected void moveHider() { treasurePos = hider.getTreasureLocation(); // Difference between GameEngine and HideAndSeekGameEngine. diff --git a/src/main/java/com/treasure/hunt/strategy/hider/impl/MaxAreaAngularHintStrategy.java b/src/main/java/com/treasure/hunt/strategy/hider/impl/MaxAreaAngularHintStrategy.java index 429753c3..43c3d5bc 100644 --- a/src/main/java/com/treasure/hunt/strategy/hider/impl/MaxAreaAngularHintStrategy.java +++ b/src/main/java/com/treasure/hunt/strategy/hider/impl/MaxAreaAngularHintStrategy.java @@ -116,9 +116,9 @@ public Coordinate computeIntersectionOnBoundary(LineSegment line, LineSegment se /** - * Computes the 2 Intersections between the bounding circle and the current hint, then - * Merges the resulting Polygon and the remaining possible Area - * to the new possible Area + * Computes the 2 intersections between the bounding circle and the current hint, + * then merges the resulting polygon and the remaining possible area + * to the new possible area * * @param hint The hint to integrate * @return TODO