summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-18 19:59:09 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-18 19:59:09 +0100
commitc2d604c40fcd9ae8c587a68071fc8e3d4d9a3ce3 (patch)
tree8cbe5849b5e79e3a7bc433bb8b35b7db7c593cba
parent62a6c59188edc5ea04ecb24f2a2d9c6cdf55fce4 (diff)
downloadRustAndDust-c2d604c40fcd9ae8c587a68071fc8e3d4d9a3ce3.zip
RustAndDust-c2d604c40fcd9ae8c587a68071fc8e3d4d9a3ce3.tar.gz
PossiblePaths: add setExit(Orientation exit)
-rw-r--r--core/src/ch/asynk/tankontank/engine/PossiblePaths.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/PossiblePaths.java b/core/src/ch/asynk/tankontank/engine/PossiblePaths.java
index 2cf45eb..91038da 100644
--- a/core/src/ch/asynk/tankontank/engine/PossiblePaths.java
+++ b/core/src/ch/asynk/tankontank/engine/PossiblePaths.java
@@ -211,6 +211,14 @@ public class PossiblePaths implements Iterable<Vector3>
return cost;
}
+ public void setExit(Orientation exit)
+ {
+ List<Tile> path = getPath(0);
+ Tile exitTile = board.getAdjTileAt(to, exit);
+ path.add(to);
+ to = exitTile;
+ }
+
private List<Tile> getPath(int i)
{
if (ctrlTiles.size() == 0)