diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-18 19:59:09 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-18 19:59:09 +0100 |
commit | c2d604c40fcd9ae8c587a68071fc8e3d4d9a3ce3 (patch) | |
tree | 8cbe5849b5e79e3a7bc433bb8b35b7db7c593cba /core/src/ch/asynk/tankontank/engine | |
parent | 62a6c59188edc5ea04ecb24f2a2d9c6cdf55fce4 (diff) | |
download | RustAndDust-c2d604c40fcd9ae8c587a68071fc8e3d4d9a3ce3.zip RustAndDust-c2d604c40fcd9ae8c587a68071fc8e3d4d9a3ce3.tar.gz |
PossiblePaths: add setExit(Orientation exit)
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/PossiblePaths.java | 8 |
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) |