summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-01-21 14:11:17 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2020-01-21 14:11:17 +0100
commit42a64e4e3767dc1b8f1a1cf5db5e10714d221973 (patch)
tree0f569870bf0782bb7dfa6b7b3099bcde54886c25 /core/src/ch/asynk
parentdb2472e4a19945e87ce4ff599b94bcfd16e251ab (diff)
downloadgdx-boardgame-42a64e4e3767dc1b8f1a1cf5db5e10714d221973.zip
gdx-boardgame-42a64e4e3767dc1b8f1a1cf5db5e10714d221973.tar.gz
Path : add show(int, int)
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Path.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Path.java b/core/src/ch/asynk/gdx/boardgame/Path.java
index 10b26c9..a7e1d5e 100644
--- a/core/src/ch/asynk/gdx/boardgame/Path.java
+++ b/core/src/ch/asynk/gdx/boardgame/Path.java
@@ -70,6 +70,20 @@ public class Path extends IterableArray<Tile> implements Disposable, Pool.Poolab
return to;
}
+ public void show(int i, int j)
+ {
+ Tile prev = null;
+ for (int n = 0; n < size(); n++) {
+ final Tile tile = get(n);
+ if (prev != null) {
+ final Orientation o = Orientation.fromTiles(prev, tile);
+ prev.enableOverlay(i, o);
+ tile.enableOverlay(j, o.opposite());
+ }
+ prev = tile;
+ }
+ }
+
public boolean nextPosition(Piece piece, Vector3 v)
{
if (hasNext()) {