summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-14 16:53:41 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-14 16:53:41 +0100
commitae6ee1006b0ed8829fae2ee24ca1ab24a1c96343 (patch)
tree95014f685d3e0fa3cac6c87f0fe440be09a2ca5c /core/src/ch/asynk/tankontank/engine
parent14223fe9fd30832ddfc2798ad6f287a5888592ea (diff)
downloadRustAndDust-ae6ee1006b0ed8829fae2ee24ca1ab24a1c96343.zip
RustAndDust-ae6ee1006b0ed8829fae2ee24ca1ab24a1c96343.tar.gz
Pawn: add boolean isRotation() {distance == 0}
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 1b4a96c..57f8c0f 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -87,6 +87,11 @@ public abstract class Pawn implements Moveable, Disposable
orientation = Orientation.KEEP;
}
+ public boolean isRotation()
+ {
+ return (distance == 0);
+ }
+
public boolean isComplete()
{
return ((from != null) && (to != null));