diff options
Diffstat (limited to 'core/src/ch/asynk/rustanddust/engine')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/Board.java | 3 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/SearchBoard.java | 2 |
2 files changed, 0 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Board.java b/core/src/ch/asynk/rustanddust/engine/Board.java index 5db34e3..6b80c04 100644 --- a/core/src/ch/asynk/rustanddust/engine/Board.java +++ b/core/src/ch/asynk/rustanddust/engine/Board.java @@ -325,7 +325,6 @@ public abstract class Board implements Disposable, Animation protected int collectPossibleTargets(Pawn pawn, Collection<Pawn> units, Collection<Pawn> targets) { - targets.clear(); for (Pawn target : units) { if (pawn.canEngage(target) && searchBoard.canAttack(pawn, target, true)) targets.add(target); @@ -336,7 +335,6 @@ public abstract class Board implements Disposable, Animation protected int collectMoveAssists(Pawn pawn, Collection<Pawn> assists) { - assists.clear(); setAdjacentTiles(pawn.getTile(), neighbours); for (int i = 0; i < 6; i++) { Tile tile = neighbours[i]; @@ -352,7 +350,6 @@ public abstract class Board implements Disposable, Animation protected int collectAttackAssists(Pawn pawn, Pawn target, Collection<Pawn> units, Collection<Pawn> assists) { - assists.clear(); for (Pawn p : units) { if ((p != pawn) && p.canEngage(target) && searchBoard.canAttack(p, target, !p.canAssistEngagementWithoutLos())) assists.add(p); diff --git a/core/src/ch/asynk/rustanddust/engine/SearchBoard.java b/core/src/ch/asynk/rustanddust/engine/SearchBoard.java index 141f5cc..803214e 100644 --- a/core/src/ch/asynk/rustanddust/engine/SearchBoard.java +++ b/core/src/ch/asynk/rustanddust/engine/SearchBoard.java @@ -110,7 +110,6 @@ public class SearchBoard public int possibleMovesFrom(Pawn pawn, Collection<Tile> moves) { - moves.clear(); searchCount += 1; Node adjacents[] = new Node[6]; @@ -264,7 +263,6 @@ public class SearchBoard public int possibleTargetsFrom(Pawn shooter, Collection<Pawn> targets) { - targets.clear(); searchCount += 1; Node adjacents[] = new Node[6]; |