From d08ebc018770ab4f1429ebd872125a1027805876 Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 25 Mar 2022 21:58:23 +0100 Subject: [PATCH] code cleanup --- src/main/java/ch/zhaw/pm2/racetrack/PositionVector.java | 4 ++++ .../ch/zhaw/pm2/racetrack/strategy/DoNotMoveStrategy.java | 1 + .../zhaw/pm2/racetrack/strategy/PathFinderMoveStrategy.java | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/PositionVector.java b/src/main/java/ch/zhaw/pm2/racetrack/PositionVector.java index c059038..a33302e 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/PositionVector.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/PositionVector.java @@ -33,6 +33,7 @@ public final class PositionVector { /** * Adds two PositionVectors (e.g. car position and velocity vector or two velocity vectors). + * * @param vectorA A position or velocity vector * @param vectorB A position or velocity vector * @return A new PositionVector holding the result of the addition. If both @@ -45,6 +46,7 @@ public final class PositionVector { /** * Subtracts two PositionVectors (e.g. car position and velocity vector or two velocity vectors). + * * @param vectorA A position or velocity vector * @param vectorB A position or velocity vector * @return A new PositionVector holding the result of the addition. If both @@ -58,6 +60,7 @@ public final class PositionVector { /** * Calculates the scalar product (Skalarprodukt) of two 2D vectors. The scalar product * multiplies the lengths of the parallel components of the vectors. + * * @param vectorA A position or velocity vector * @param vectorB A position or velocity vector * @return The scalar product (vectorA * vectorB). Since vectorA and @@ -75,6 +78,7 @@ public final class PositionVector { /** * Copy constructor + * * @param other */ public PositionVector(final PositionVector other) { diff --git a/src/main/java/ch/zhaw/pm2/racetrack/strategy/DoNotMoveStrategy.java b/src/main/java/ch/zhaw/pm2/racetrack/strategy/DoNotMoveStrategy.java index ecfe157..ae9a050 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/strategy/DoNotMoveStrategy.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/strategy/DoNotMoveStrategy.java @@ -11,6 +11,7 @@ public class DoNotMoveStrategy implements MoveStrategy { /** * This method will be used to return the next Direction for the car. + * * @return a NONE Direction */ @Override diff --git a/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFinderMoveStrategy.java b/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFinderMoveStrategy.java index cc3b6c7..c870b1f 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFinderMoveStrategy.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFinderMoveStrategy.java @@ -23,6 +23,7 @@ public class PathFinderMoveStrategy implements MoveStrategy { /** * Constructor which initialises the needed variables and creates the MoveList + * * @param track track instance of the game * @param carIndex index of the car which owns this moveStrategy */ @@ -82,6 +83,7 @@ public class PathFinderMoveStrategy implements MoveStrategy { /** * Method to check if a State is already in List calculatedStates + * * @param state the State which should be checked * @return true if it is in List, false if it isn't in List */