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/Pawn.java7
-rw-r--r--core/src/ch/asynk/tankontank/engine/SearchBoard.java2
2 files changed, 7 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 8c31578..aa6e666 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -27,7 +27,7 @@ public abstract class Pawn implements Drawable, Disposable
int distance;
Pawn target;
boolean isClear;
- boolean isFlankAttack;
+ boolean isFlank;
}
private static final float MOVE_TIME = 0.4f;
@@ -84,6 +84,11 @@ public abstract class Pawn implements Drawable, Disposable
image.dispose();
}
+ public boolean isFlankAttack()
+ {
+ return (attack.isClear && attack.isFlank);
+ }
+
public Vector3 getPosition()
{
return position;
diff --git a/core/src/ch/asynk/tankontank/engine/SearchBoard.java b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
index c39cb0d..3fe77a3 100644
--- a/core/src/ch/asynk/tankontank/engine/SearchBoard.java
+++ b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
@@ -365,7 +365,7 @@ public class SearchBoard
}
pawn.attack.isClear = true;
- pawn.attack.isFlankAttack = isFlankAttack(target.getFlankSides(), los);
+ pawn.attack.isFlank = isFlankAttack(target.getFlankSides(), los);
return true;
}