summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/PathBuilder.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
index 16c2f86..af5d78b 100644
--- a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
+++ b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
@@ -145,12 +145,9 @@ public class PathBuilder implements Disposable
if ((next == null) || next.isOffMap()) continue;
Orientation o = board.getSide(i);
- int n = next.costFrom(pawn, o);
- boolean r = next.road(o);
+ int m = (mvtLeft - next.costFrom(pawn, o));
int f = (fitness + (next.isObjectiveFor(pawn) ? 1 : 0));
-
- int m = (mvtLeft - n);
- r &= roadMarch;
+ boolean r = (roadMarch && next.road(o));
int l = (m + (r ? pawn.getRoadMarchBonus() : 0));