summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/engine/PathBuilder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/PathBuilder.java b/core/src/ch/asynk/tankontank/engine/PathBuilder.java
index a227b01..f3ebb87 100644
--- a/core/src/ch/asynk/tankontank/engine/PathBuilder.java
+++ b/core/src/ch/asynk/tankontank/engine/PathBuilder.java
@@ -239,8 +239,10 @@ public class PathBuilder implements Disposable
{
orientation = o;
Path path = getPath(0);
- path.cost += 1;
- path.tiles.add(to);
+ if (from != to) {
+ path.cost += 1;
+ path.tiles.add(to);
+ }
to = board.getAdjTileAt(to, o);
}