Archived
0

set 0.5 errors on check fuel

This commit is contained in:
Mo
2015-10-27 14:15:57 +03:00
parent be6daf88d9
commit ede30df161

View File

@@ -313,7 +313,7 @@ public class VendorsGraph extends ConnectibleGraph<Vendor> {
public Path<Vendor> getPath(double fuel){
Path<Vendor> res = null;
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 (res == null || (p.getSize() < res.getSize() || p.getSize() == res.getSize() && p.getFuelCost() < res.getFuelCost()) && p.getRefillCount(fuel) <= res.getRefillCount(fuel)) {
res = p;