summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-06 00:03:31 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-06 00:03:31 +0200
commita27f8bb478b29c6d219a4fa48c9343bf8a3b03d1 (patch)
tree1b2213f13d15257484e5735f1c6955ca7eb924ef /core/src/ch
parentb326ffb4c6724354370c9751a7f6d34ec492b32b (diff)
downloadRustAndDust-a27f8bb478b29c6d219a4fa48c9343bf8a3b03d1.zip
RustAndDust-a27f8bb478b29c6d219a4fa48c9343bf8a3b03d1.tar.gz
Orientation.fromMove: return KEEP if dx== 0 && dy==0
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Orientation.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Orientation.java b/core/src/ch/asynk/tankontank/engine/Orientation.java
index 8ba9388..36cb500 100644
--- a/core/src/ch/asynk/tankontank/engine/Orientation.java
+++ b/core/src/ch/asynk/tankontank/engine/Orientation.java
@@ -86,6 +86,7 @@ public enum Orientation
int dy = row1 - row0;
if (dy == 0) {
+ if (dx == 0) return Orientation.KEEP;
if (dx > 0) return Orientation.NORTH;
return Orientation.SOUTH;
}