From 06405c508020357d2dccb59584c1390712e2b5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 11 Nov 2015 00:55:34 +0100 Subject: PathBuilder: add stupid choosePath() --- core/src/ch/asynk/rustanddust/engine/PathBuilder.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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]; -- cgit v1.1-2-g2b99