feat(path): implement getTravelTime

This commit is contained in:
Paul Alnet 2024-03-25 09:04:00 +01:00
parent 853edfb344
commit b8aeab9180

View file

@ -227,12 +227,13 @@ public class Path {
* *
* @return Time (in seconds) required to travel this path at the given speed (in * @return Time (in seconds) required to travel this path at the given speed (in
* kilometers-per-hour). * kilometers-per-hour).
*
* @deprecated Need to be implemented.
*/ */
public double getTravelTime(double speed) { public double getTravelTime(double speed) {
// TODO: double retour = 0 ;
return 0; for (Arc arc : arcs) {
retour += arc.getTravelTime(speed);
}
return retour;
} }
/** /**