summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Move.java14
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java8
2 files changed, 16 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Move.java b/core/src/ch/asynk/tankontank/engine/Move.java
index 2f0c138..06035c3 100644
--- a/core/src/ch/asynk/tankontank/engine/Move.java
+++ b/core/src/ch/asynk/tankontank/engine/Move.java
@@ -98,12 +98,22 @@ public class Move extends Path implements Iterable<Vector3>
movePool.free(this);
}
- public boolean isEntry()
+ public boolean isSet()
+ {
+ return (type == MoveType.SET);
+ }
+
+ public boolean isEnter()
{
return (type == MoveType.ENTER);
}
- public boolean isComplete()
+ public boolean isRegular()
+ {
+ return (type == MoveType.REGULAR);
+ }
+
+ public boolean isFinal()
{
return (type != MoveType.ENTER);
}
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 7e0f9da..b471406 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -113,11 +113,11 @@ public abstract class Pawn implements Moveable, Disposable
public void move(Move move)
{
- if (move.isEntry())
+ if (move.isEnter())
throw new RuntimeException("wrong MoveType");
if (this.move != null) {
- if (this.move.isEntry())
+ if (this.move.isEnter())
this.move.dispose();
else
throw new RuntimeException("try to override an existing move instance");
@@ -128,7 +128,7 @@ public abstract class Pawn implements Moveable, Disposable
public void enter(Move move)
{
- if (!move.isEntry())
+ if (!move.isEnter())
throw new RuntimeException("wrong MoveType");
if (this.move != null)
@@ -152,7 +152,7 @@ public abstract class Pawn implements Moveable, Disposable
public boolean justEntered()
{
- return ((move != null) && move.isEntry());
+ return ((move != null) && move.isEnter());
}
public boolean is(Faction faction)