summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Tile.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java
index 0514c6d..1c767fe 100644
--- a/core/src/ch/asynk/tankontank/engine/Tile.java
+++ b/core/src/ch/asynk/tankontank/engine/Tile.java
@@ -37,7 +37,7 @@ public abstract class Tile implements Drawable, Disposable
public Tile(float x, float y, int col, int row, TextureAtlas atlas)
{
- this.stack = null;
+ this.stack = new ArrayDeque<Pawn>();
this.x = x;
this.y = y;
this.col = col;
@@ -54,13 +54,12 @@ public abstract class Tile implements Drawable, Disposable
@Override
public void dispose()
{
- if(stack != null) stack.clear();
+ stack.clear();
overlays.dispose();
}
public boolean isEmpty()
{
- if (stack == null) return true;
return stack.isEmpty();
}
@@ -71,7 +70,6 @@ public abstract class Tile implements Drawable, Disposable
public int push(Pawn pawn)
{
- if (stack == null) stack = new ArrayDeque<Pawn>();
stack.push(pawn);
return stack.size();
}