summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-15 23:56:34 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-15 23:56:34 +0100
commitc1ce944430bea5f0f436c03c04a7b224eecd6655 (patch)
treed4c4f1007d36fd51e57a90da1cf81953595e3d3f /core/src/ch/asynk/tankontank/engine
parent2867d71c854a69afdded2c53dd95879d8bdcbee7 (diff)
downloadRustAndDust-c1ce944430bea5f0f436c03c04a7b224eecd6655.zip
RustAndDust-c1ce944430bea5f0f436c03c04a7b224eecd6655.tar.gz
Orientation: addstatic Orientation fromAdj(Tile from, Tile to)
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Orientation.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Orientation.java b/core/src/ch/asynk/tankontank/engine/Orientation.java
index b5fe530..550bb9f 100644
--- a/core/src/ch/asynk/tankontank/engine/Orientation.java
+++ b/core/src/ch/asynk/tankontank/engine/Orientation.java
@@ -99,6 +99,11 @@ public enum Orientation
}
}
+ public static Orientation fromAdj(Tile from, Tile to)
+ {
+ return fromAdj(from.col, from.row, to.col, to.row);
+ }
+
public static Orientation fromAdj(int col0, int row0, int col1, int row1)
{
Orientation o = KEEP;