summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/SearchBoard.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/SearchBoard.java b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
index fcd7a58..41516ae 100644
--- a/core/src/ch/asynk/tankontank/engine/SearchBoard.java
+++ b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
@@ -359,6 +359,16 @@ public class SearchBoard
return o.isInSides(angle);
}
+ private boolean isClearAttack(Tile from, List<Node> los)
+ {
+ int n = los.size() - 1;
+ for (int i = 1; i < n; i++) {
+ if (getTile(los.get(i)).blockLineOfSightFrom(from))
+ return false;
+ }
+ return true;
+ }
+
private boolean validatePathAngle(int angle, List<Node> los)
{
int forth = 0;