From ae6ee1006b0ed8829fae2ee24ca1ab24a1c96343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 14 Nov 2014 16:53:41 +0100 Subject: Pawn: add boolean isRotation() {distance == 0} --- core/src/ch/asynk/tankontank/engine/Pawn.java | 5 +++++ 1 file changed, 5 insertions(+) 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)); -- cgit v1.1-2-g2b99