From 1a13092fd26a018027ab3de3a2f882dd8391fc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 4 May 2016 13:47:27 +0200 Subject: StateEngage: doBreakMove() uses buildShortest(Tile) --- core/src/ch/asynk/rustanddust/game/map/Map2Moves.java | 2 +- core/src/ch/asynk/rustanddust/game/states/StateEngage.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/map/Map2Moves.java b/core/src/ch/asynk/rustanddust/game/map/Map2Moves.java index e092fea..29f5c77 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map2Moves.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map2Moves.java @@ -56,13 +56,13 @@ public abstract class Map2Moves extends Map1Units public void pathsInit(Unit unit) { paths.init(unit); } public void pathsInit(Unit unit, Hex from) { paths.init(unit, from); } public int pathsBuild(Hex hex) { return paths.build(hex); } + public int pathsBuildShortest(Hex hex) { return paths.buildShortest(hex); } public Hex pathsTo() { return (Hex) paths.to; } public void pathsSetOrientation(Orientation o) { paths.orientation = o; } public boolean pathsIsSet() { return paths.isSet(); } public boolean pathsCanExit(Orientation o) { return paths.canExit(o); } public boolean pathsContains(Hex hex) { return paths.contains(hex); } public int pathsChooseBest() { return paths.chooseBest(); } - public int pathsChooseShortest() { return paths.chooseShortest(); } public int pathsChooseExit(Orientation o) { return paths.chooseExit(o); } public int pathsToggleHex(Hex hex) { diff --git a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java index 27c1632..5d59d3c 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java @@ -140,8 +140,7 @@ public class StateEngage extends StateCommon map.hexMoveHide(activeUnit.getHex()); map.hexDirectionsHide(to); map.pathsInit(activeUnit); - map.pathsBuild(to); - map.pathsChooseShortest(); + map.pathsBuildShortest(to); map.pathsSetOrientation(o); ctrl.postOrder(map.getMoveOrder(activeUnit, false)); } -- cgit v1.1-2-g2b99