diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-04 13:47:27 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-04 13:47:27 +0200 |
commit | 1a13092fd26a018027ab3de3a2f882dd8391fc75 (patch) | |
tree | 048615ef36645a5f9cb6261e893f96901f505cad /core/src/ch/asynk/rustanddust | |
parent | 9424d81a342b9a9ec498689d11ea232951e9be2c (diff) | |
download | RustAndDust-1a13092fd26a018027ab3de3a2f882dd8391fc75.zip RustAndDust-1a13092fd26a018027ab3de3a2f882dd8391fc75.tar.gz |
StateEngage: doBreakMove() uses buildShortest(Tile)
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/map/Map2Moves.java | 2 | ||||
-rw-r--r-- | 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)); } |