code cleanup
This commit is contained in:
@@ -34,14 +34,14 @@ public class PathFollowerMoveStrategy implements MoveStrategy {
|
||||
|
||||
/**
|
||||
* Constructor to create a new PathFollowerMoveStrategy for a car.
|
||||
* @param path The location where the file is saved
|
||||
* @param trackFile The location where the file is saved
|
||||
* @param startPosition The start position of the car
|
||||
* @throws FileNotFoundException If the file with the given path does not exist.
|
||||
*/
|
||||
public PathFollowerMoveStrategy(String path, PositionVector startPosition) throws FileNotFoundException {
|
||||
public PathFollowerMoveStrategy(File trackFile, PositionVector startPosition) throws FileNotFoundException {
|
||||
pointList = new ArrayList<>();
|
||||
pointer = 0;
|
||||
readFile(new File(path));
|
||||
readFile(trackFile);
|
||||
currentPosition = startPosition;
|
||||
currentVelocity = new PositionVector(0, 0);
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@ package ch.zhaw.pm2.racetrack;
|
||||
|
||||
import ch.zhaw.pm2.racetrack.given.ConfigSpecification;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* This Class tests the track
|
||||
*/
|
||||
public class TrackTest {
|
||||
Track trackObj;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user