From c1ce944430bea5f0f436c03c04a7b224eecd6655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 15 Nov 2014 23:56:34 +0100 Subject: Orientation: addstatic Orientation fromAdj(Tile from, Tile to) --- core/src/ch/asynk/tankontank/engine/Orientation.java | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.1-2-g2b99