summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-05 12:36:37 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-05 12:36:37 +0200
commit7ca4aa7b91179c635195ec0e3d749ced31e206be (patch)
treed951121a625075ce652d7f628806452a1543512c /core/src/ch
parent291df4182714ac56dffa4d12bb91a83fe7be29ae (diff)
downloadRustAndDust-7ca4aa7b91179c635195ec0e3d749ced31e206be.zip
RustAndDust-7ca4aa7b91179c635195ec0e3d749ced31e206be.tar.gz
Board.nodesToSet is good enough
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 6a5867e..9a0ac32 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -303,16 +303,13 @@ public abstract class Board implements Disposable
private int nodesToSet(List<Vector<SearchBoard.Node>> nodes, Set<GridPoint2> points)
{
- // FIXME : optimize this
for (GridPoint2 point : points)
gridPoint2Pool.free(point);
points.clear();
for (Vector<SearchBoard.Node> path : nodes) {
- for (int i = 0, n = path.size(); i < n; i++) {
- // FIXME : optimize this
+ for (SearchBoard.Node node : path) {
GridPoint2 point = gridPoint2Pool.obtain();
- SearchBoard.Node node = path.get(i);
point.set(node.col, node.row);
if (!points.add(point))
gridPoint2Pool.free(point);