added all javadocs to class Track

This commit is contained in:
Leonardo Brandenberger 2022-03-25 08:58:34 +01:00
parent 13012c1d4b
commit 2366f798ca
1 changed files with 6 additions and 4 deletions

View File

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