diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-06 00:03:31 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-06 00:03:31 +0200 |
commit | a27f8bb478b29c6d219a4fa48c9343bf8a3b03d1 (patch) | |
tree | 1b2213f13d15257484e5735f1c6955ca7eb924ef /core | |
parent | b326ffb4c6724354370c9751a7f6d34ec492b32b (diff) | |
download | RustAndDust-a27f8bb478b29c6d219a4fa48c9343bf8a3b03d1.zip RustAndDust-a27f8bb478b29c6d219a4fa48c9343bf8a3b03d1.tar.gz |
Orientation.fromMove: return KEEP if dx== 0 && dy==0
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Orientation.java | 1 |
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; } |