summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java5
-rw-r--r--core/src/ch/asynk/tankontank/engine/PawnSet.java22
-rw-r--r--core/src/ch/asynk/tankontank/engine/TileSet.java23
3 files changed, 0 insertions, 50 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 60a3611..5f54564 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -1,6 +1,5 @@
package ch.asynk.tankontank.engine;
-import java.util.List;
import java.util.Iterator;
import java.util.Collection;
import java.util.ArrayList;
@@ -37,16 +36,12 @@ public abstract class Board implements Disposable
{
public Tile first();
public void enable(int i, boolean enable);
- public void collectPawns(PawnCollection pawns);
- public int fromNodes(Collection<SearchBoard.Node> nodes);
}
public interface PawnCollection extends Collection<Pawn>
{
public Pawn first();
public void enable(int i, boolean enable);
- public void collectTiles(TileCollection tiles);
- public int fromNodes(Collection<SearchBoard.Node> nodes);
}
public static class Config
diff --git a/core/src/ch/asynk/tankontank/engine/PawnSet.java b/core/src/ch/asynk/tankontank/engine/PawnSet.java
index d06fdd2..0df2332 100644
--- a/core/src/ch/asynk/tankontank/engine/PawnSet.java
+++ b/core/src/ch/asynk/tankontank/engine/PawnSet.java
@@ -1,7 +1,5 @@
package ch.asynk.tankontank.engine;
-import java.util.Iterator;
-import java.util.Collection;
import java.util.LinkedHashSet;
public class PawnSet extends LinkedHashSet<Pawn> implements Board.PawnCollection
@@ -25,24 +23,4 @@ public class PawnSet extends LinkedHashSet<Pawn> implements Board.PawnCollection
for (Pawn pawn : this)
pawn.enableOverlay(i, enable);
}
-
- public void collectTiles(Board.TileCollection tiles)
- {
- tiles.clear();
- for (Pawn pawn : this)
- tiles.add(pawn.getTile());
- }
-
- public int fromNodes(Collection<SearchBoard.Node> nodes)
- {
- clear();
- for (SearchBoard.Node node : nodes) {
- Tile tile = board.getTile(node.col, node.row);
- Iterator<Pawn> pawns = tile.iterator();
- while(pawns.hasNext())
- add(pawns.next());
- }
-
- return size();
- }
}
diff --git a/core/src/ch/asynk/tankontank/engine/TileSet.java b/core/src/ch/asynk/tankontank/engine/TileSet.java
index 6f71b42..c8897f3 100644
--- a/core/src/ch/asynk/tankontank/engine/TileSet.java
+++ b/core/src/ch/asynk/tankontank/engine/TileSet.java
@@ -1,7 +1,5 @@
package ch.asynk.tankontank.engine;
-import java.util.Iterator;
-import java.util.Collection;
import java.util.LinkedHashSet;
public class TileSet extends LinkedHashSet<Tile> implements Board.TileCollection
@@ -25,25 +23,4 @@ public class TileSet extends LinkedHashSet<Tile> implements Board.TileCollection
for (Tile tile : this)
board.enableOverlayOn(tile, i, enable);
}
-
- public void collectPawns(Board.PawnCollection pawns)
- {
- pawns.clear();
- for (Tile tile : this) {
- Iterator<Pawn> itr = tile.iterator();
- while(itr.hasNext())
- pawns.add(itr.next());
- }
- }
-
- public int fromNodes(Collection<SearchBoard.Node> nodes)
- {
- clear();
- for (SearchBoard.Node node : nodes) {
- Tile tile = board.getTile(node.col, node.row);
- add(tile);
- }
-
- return size();
- }
}