summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-11 00:55:34 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-11 00:55:34 +0100
commit06405c508020357d2dccb59584c1390712e2b5d2 (patch)
treec8e4baf57c518b72f5083a8e939ec266f128bd99 /core
parent0614f49e355231df2f132486c40248805a7d485a (diff)
downloadRustAndDust-06405c508020357d2dccb59584c1390712e2b5d2.zip
RustAndDust-06405c508020357d2dccb59584c1390712e2b5d2.tar.gz
PathBuilder: add stupid choosePath()
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/PathBuilder.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
index 3692a91..7023727 100644
--- a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
+++ b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
@@ -119,6 +119,21 @@ public class PathBuilder implements Disposable
return paths.size();
}
+ public int choosePath()
+ {
+ if (paths.size() > 1) {
+ ctrlTiles.clear();
+ Path good = paths.get(1);
+ for (Tile tile : good.tiles) {
+ toggleCtrlTile(tile);
+ if (paths.size() == 1)
+ break;
+ }
+ }
+
+ return 1;
+ }
+
private void findAllPaths(Tile from, int mvtLeft, boolean roadMarch)
{
Tile moves[] = new Tile[6];