From 2b2834f47a692cf68139cd580d9889a75e642cfa Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Thu, 24 Mar 2022 17:26:44 +0100 Subject: [PATCH] added all javadocs to class Track --- src/main/java/ch/zhaw/pm2/racetrack/Track.java | 9 +++++---- 1 file changed, 5 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 79f5e70..e4eeaa7 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/Track.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/Track.java @@ -66,8 +66,8 @@ public class Track implements TrackSpecification { private ConfigSpecification.SpaceType finishTyp; /** - * Initialize a Track from the given track file. - * + * Initializes the Track from the given track File including the cars. + * Throws an corresponding error if one of the conditions are not met to build a track. * @param trackFile Reference to a file containing the track data * @throws FileNotFoundException if the given track file could not be found * @throws InvalidTrackFormatException if the track file contains invalid data (no tracklines, ...) @@ -123,10 +123,11 @@ public class Track implements TrackSpecification { } } - //TODO: THIS + //TODO: SAVE Finish somewhere maybe? /** + * Checks if there is a finish line in the track if there is no finish line found throws a Exception. * - * @throws InvalidTrackFormatException + * @throws InvalidTrackFormatException if there is no finish Line found in the track */ private void findFinish() throws InvalidTrackFormatException { for (int i = 0; i < track.size(); i++) {