set 0.5 errors on check fuel
This commit is contained in:
@@ -313,7 +313,7 @@ public class VendorsGraph extends ConnectibleGraph<Vendor> {
|
|||||||
public Path<Vendor> getPath(double fuel){
|
public Path<Vendor> getPath(double fuel){
|
||||||
Path<Vendor> res = null;
|
Path<Vendor> res = null;
|
||||||
for (Path<Vendor> p : paths) {
|
for (Path<Vendor> p : paths) {
|
||||||
if ((fuel >= p.getMinFuel() || getSource().getEntry().canRefill()) && fuel <= p.getMaxFuel()) {
|
if (((fuel - p.getMinFuel() > 0.05) || getSource().getEntry().canRefill()) && fuel <= p.getMaxFuel()) {
|
||||||
if (getProfile().getPathPriority().equals(Profile.PATH_PRIORITY.FAST)) {
|
if (getProfile().getPathPriority().equals(Profile.PATH_PRIORITY.FAST)) {
|
||||||
if (res == null || (p.getSize() < res.getSize() || p.getSize() == res.getSize() && p.getFuelCost() < res.getFuelCost()) && p.getRefillCount(fuel) <= res.getRefillCount(fuel)) {
|
if (res == null || (p.getSize() < res.getSize() || p.getSize() == res.getSize() && p.getFuelCost() < res.getFuelCost()) && p.getRefillCount(fuel) <= res.getRefillCount(fuel)) {
|
||||||
res = p;
|
res = p;
|
||||||
|
|||||||
Reference in New Issue
Block a user