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; } /**