summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-15 23:57:09 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-15 23:57:09 +0100
commitf61bd765a4d85c759304189adfc05be262c048f2 (patch)
tree9c9049a96ff126fd440de6d8ddd056d4707bd4df /core
parentc1ce944430bea5f0f436c03c04a7b224eecd6655 (diff)
downloadRustAndDust-f61bd765a4d85c759304189adfc05be262c048f2.zip
RustAndDust-f61bd765a4d85c759304189adfc05be262c048f2.tar.gz
StateBreak,StateRotate: use Orientation fromAdj(Tile, Tile)
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateBreak.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateBreak.java b/core/src/ch/asynk/tankontank/game/states/StateBreak.java
index 479f5ae..e9af364 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateBreak.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateBreak.java
@@ -59,7 +59,7 @@ public class StateBreak extends StateCommon
map.hideBreakPawns();
}
} else {
- o = Orientation.fromAdj(to.getCol(), to.getRow(), downHex.getCol(), downHex.getRow());
+ o = Orientation.fromAdj(to, downHex);
if (o == Orientation.KEEP) return;
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index 130e259..50cfce2 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
@@ -85,7 +85,7 @@ public class StateRotate extends StateCommon
{
if (rotationSet) return;
- o = Orientation.fromAdj(to.getCol(), to.getRow(), downHex.getCol(), downHex.getRow());
+ o = Orientation.fromAdj(to, downHex);
if (o == Orientation.KEEP) return;
if (!activeUnit.movement.entryMove && rotateOnly && (o == activeUnit.getOrientation())) return;