From 2366f798ca1577cc6037071e52e1c51b419d7ba2 Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Fri, 25 Mar 2022 08:58:34 +0100 Subject: [PATCH] added all javadocs to class Track --- src/main/java/ch/zhaw/pm2/racetrack/Track.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/Track.java b/src/main/java/ch/zhaw/pm2/racetrack/Track.java index 63db2db..0f36149 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/Track.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/Track.java @@ -123,10 +123,11 @@ public class Track implements TrackSpecification { } } - //TODO: THIS /** - * @throws InvalidTrackFormatException + * Determines the finish line and saves it in a list, throws an Exception if none is found. + * + * @throws InvalidTrackFormatException thrown if no finish line is found */ private void findFinish() throws InvalidTrackFormatException { for (int i = 0; i < track.size(); i++) { @@ -271,10 +272,11 @@ public class Track implements TrackSpecification { * If the location is outside the track bounds, it is considered a wall. * * @param position The coordinates of the position to examine - * @return The type of track position at the given location + * @return The type of space at the desired position */ @Override public Config.SpaceType getSpaceType(PositionVector position) { + //TODO: TO BE DELETED?? //isPositionVectorOnTrack(position); Should be used but we are not allowed to change method head. We don't use function anyway char charAtPosition = track.get(position.getY()).charAt(position.getX()); ConfigSpecification.SpaceType[] spaceTypes = ConfigSpecification.SpaceType.values(); @@ -284,7 +286,7 @@ public class Track implements TrackSpecification { } } - return ConfigSpecification.SpaceType.WALL; + return null; } /**