diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-07 11:38:24 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-07 11:38:24 +0200 |
commit | 1670f5afbf1fa49a5d7e56829149bb58a379cfd4 (patch) | |
tree | c6270df4c71b96d480862997157738c5367463eb /core/src/ch/asynk/tankontank | |
parent | 585221c04d1a0c1e4325d61870803cdb0db53034 (diff) | |
download | RustAndDust-1670f5afbf1fa49a5d7e56829149bb58a379cfd4.zip RustAndDust-1670f5afbf1fa49a5d7e56829149bb58a379cfd4.tar.gz |
Board: possiblePaths(p, from, to, points) remove 'from' and 'to' from point Set 'points'
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 9d3ae65..b906348 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -298,7 +298,8 @@ public abstract class Board implements Disposable points.clear(); for (ArrayList<SearchBoard.Node> path : nodes) { - for (SearchBoard.Node node : path) { + for (int i = 1, n = (path.size() - 1); i < n; i++) { + SearchBoard.Node node = path.get(i); GridPoint2 point = gridPoint2Pool.obtain(); point.set(node.col, node.row); if (!points.add(point)) |