summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-29 12:25:22 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-29 12:25:22 +0100
commitb4e5f726ca304b0c00021d7a108542a135666df4 (patch)
treeab4fff5a7d2ee6e77b50a0a69706d347f6437a80 /core/src/ch/asynk/tankontank/engine
parent1415dfab3ed8126cf0ffa2061bcd61cf3196c6d7 (diff)
downloadRustAndDust-b4e5f726ca304b0c00021d7a108542a135666df4.zip
RustAndDust-b4e5f726ca304b0c00021d7a108542a135666df4.tar.gz
Map,Unit: simplify show/hide functions
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java6
-rw-r--r--core/src/ch/asynk/tankontank/engine/PawnSet.java14
-rw-r--r--core/src/ch/asynk/tankontank/engine/TileSet.java14
3 files changed, 3 insertions, 31 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 8fbc548..2801d18 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -40,8 +40,6 @@ public abstract class Board implements Disposable
public interface TileCollection extends Collection<Tile>
{
public Tile first();
- public void show();
- public void hide();
public void enable(int i, boolean enable);
public void collectPawns(PawnCollection pawns);
public int fromNodes(Collection<SearchBoard.Node> nodes);
@@ -50,8 +48,6 @@ public abstract class Board implements Disposable
public interface PawnCollection extends Collection<Pawn>
{
public Pawn first();
- public void show();
- public void hide();
public void enable(int i, boolean enable);
public void collectTiles(TileCollection tiles);
public int fromNodes(Collection<SearchBoard.Node> nodes);
@@ -417,7 +413,7 @@ public abstract class Board implements Disposable
tilesToDraw.remove(tile);
}
- public void enableOverlayOn(Tile tile, int i, boolean enable, Orientation o)
+ public void enableOverlayOn(Tile tile, int i, Orientation o, boolean enable)
{
if(tile.enableOverlay(i, enable, o.r()))
tilesToDraw.add(tile);
diff --git a/core/src/ch/asynk/tankontank/engine/PawnSet.java b/core/src/ch/asynk/tankontank/engine/PawnSet.java
index f4e1c27..d06fdd2 100644
--- a/core/src/ch/asynk/tankontank/engine/PawnSet.java
+++ b/core/src/ch/asynk/tankontank/engine/PawnSet.java
@@ -7,13 +7,11 @@ import java.util.LinkedHashSet;
public class PawnSet extends LinkedHashSet<Pawn> implements Board.PawnCollection
{
private final Board board;
- private int overlay;
- public PawnSet(Board board, int overlay, int n)
+ public PawnSet(Board board, int n)
{
super(n);
this.board = board;
- this.overlay = overlay;
}
public Pawn first()
@@ -22,16 +20,6 @@ public class PawnSet extends LinkedHashSet<Pawn> implements Board.PawnCollection
return iterator().next();
}
- public void show()
- {
- enable(overlay, true);
- }
-
- public void hide()
- {
- enable(overlay, false);
- }
-
public void enable(int i, boolean enable)
{
for (Pawn pawn : this)
diff --git a/core/src/ch/asynk/tankontank/engine/TileSet.java b/core/src/ch/asynk/tankontank/engine/TileSet.java
index 04f726b..6f71b42 100644
--- a/core/src/ch/asynk/tankontank/engine/TileSet.java
+++ b/core/src/ch/asynk/tankontank/engine/TileSet.java
@@ -7,13 +7,11 @@ import java.util.LinkedHashSet;
public class TileSet extends LinkedHashSet<Tile> implements Board.TileCollection
{
private final Board board;
- private int overlay;
- public TileSet(Board board, int overlay, int n)
+ public TileSet(Board board, int n)
{
super(n);
this.board = board;
- this.overlay = overlay;
}
public Tile first()
@@ -22,16 +20,6 @@ public class TileSet extends LinkedHashSet<Tile> implements Board.TileCollection
return iterator().next();
}
- public void show()
- {
- enable(overlay, true);
- }
-
- public void hide()
- {
- enable(overlay, false);
- }
-
public void enable(int i, boolean enable)
{
for (Tile tile : this)