diff --git a/HelperFunctions.java b/HelperFunctions.java index 27e424c..7abf92f 100644 --- a/HelperFunctions.java +++ b/HelperFunctions.java @@ -26,23 +26,25 @@ public class HelperFunctions { if (tollsFlag && hwyFlag) { //provides a result that both avoid tolls and major highways routeArray[0] = startCoords; routeArray[1] = destinationCoords; - routeArray[0][2] = 45; - routeArray[1][2] = 45; + routeArray[0][2] = 45; //avg speed leg 1 + routeArray[0][3] = 0; //tolls leg 1 + routeArray[1][2] = 45; //avg speed leg 2 + routeArray[1][3] = 0; //tolls leg 2 } else if (tollsFlag && !hwyFlag) { //provides a result that avoids tolls but not major highways - routeArray[0] = startCoords; - routeArray[1] = destinationCoords; - routeArray[0][2] = 45; - routeArray[1][2] = 45; + routeArray[0][2] = 60; //avg speed leg 1 + routeArray[0][3] = 0; //tolls leg 1 + routeArray[1][2] = 45; //avg speed leg 2 + routeArray[1][3] = 0; //tolls leg 2 } else if (!tollsFlag && hwyFlag) { //provides a result that does not avoid tolls and does avoid major highways - routeArray[0] = startCoords; - routeArray[1] = destinationCoords; - routeArray[0][2] = 45; - routeArray[1][2] = 45; + routeArray[0][2] = 45; //avg speed leg 1 + routeArray[0][3] = 1.50; //tolls leg 1 + routeArray[1][2] = 45; //avg speed leg 2 + routeArray[1][3] = 0; //tolls leg 2 } else if (!tollsFlag && !hwyFlag) { //provides a result that does not avoid tolls or major highways - routeArray[0] = startCoords; - routeArray[1] = destinationCoords; - routeArray[0][2] = 45; - routeArray[1][2] = 45; + routeArray[0][2] = 60; //avg speed leg 1 + routeArray[0][3] = 1.50; //tolls leg 1 + routeArray[1][2] = 45; //avg speed leg 2 + routeArray[1][3] = 0; //tolls leg 2 } return routeArray; }