summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-21 21:17:32 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-21 21:17:32 +0100
commit8a34706f23f479eead58a393c27e6a56eb3bcd4b (patch)
tree457fbfb6f9ce4908de6649f9b4634659989c66ea /core/src/ch/asynk/rustanddust
parentfe99043b4b7e2dc847b5884820e34b359f779fbd (diff)
downloadRustAndDust-8a34706f23f479eead58a393c27e6a56eb3bcd4b.zip
RustAndDust-8a34706f23f479eead58a393c27e6a56eb3bcd4b.tar.gz
PathBuilder: always search for path even if distance is < 2, to check for objectives
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/PathBuilder.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
index 518a2d3..f53516c 100644
--- a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
+++ b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
@@ -107,15 +107,7 @@ public class PathBuilder implements Disposable
this.to = to;
// from and to are not part of the path
this.distance = board.distance(from, to);
- if (distance < 2) {
- Orientation o = Orientation.fromMove(to.col, to.row, from.col, from.row);
- Path path = Path.get(0);
- path.roadMarch = to.road(o);
- path.cost = to.costFrom(pawn, o);
- paths.add(path);
- } else {
- findAllPaths(from, pawn.getMovementPoints(), 0, true);
- }
+ findAllPaths(from, pawn.getMovementPoints(), 0, true);
// printToErr("paths", paths);
stack.clear();