This commit is contained in:
El Haji Fofana 2023-03-28 16:04:00 +02:00
parent 534e0b728e
commit 2accc89628
2 changed files with 4 additions and 12 deletions

View file

@ -198,16 +198,16 @@ public class Path {
* *
* @return true if the path is valid, false otherwise. * @return true if the path is valid, false otherwise.
* *
* @deprecated Need to be implemented.
*/ */
public boolean isValid() { public boolean isValid() {
for (int i=0; i<arcs.size();i++){ boolean valid=true;
for (int i=0; i<arcs.size()-1;i++){
if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){ if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){
return false; valid=false;
} }
} }
return true; return valid;
} }
/** /**
@ -234,14 +234,6 @@ 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).
* *
<<<<<<< HEAD
=======
<<<<<<< HEAD
*
*
>>>>>>> 052958ee6eb4821ebbb9c903780d467d62617fd2
>>>>>>> 661162456a46270c315c09521ce09f85f0020150
*/ */
public double getTravelTime(double speed) { public double getTravelTime(double speed) {
double TotalTime = 0; double TotalTime = 0;