diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 07c3c8b..b33fad4 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -86,21 +86,6 @@ public abstract class Board implements Disposable searchBoard = new SearchBoard(this, cols, rows); } - @Override - public void dispose() - { - image.dispose(); - for (int i = 0; i < (cfg.cols * cfg.rows); i++) - tiles[i].dispose(); - tilesToDraw.clear(); - for (int i = 0, n = nextAnimations.size(); i < n; i++) - nextAnimations.get(i).dispose(); - animations.clear(); - for (int i = 0, n = animations.size(); i < n; i++) - animations.get(i).dispose(); - animations.clear(); - } - public Board(TileBuilder tileBuilder, Config cfg, Texture texture) { image = new Image(texture); @@ -127,6 +112,21 @@ public abstract class Board implements Disposable neighbours[i] = new GridPoint2(-1, -1); } + @Override + public void dispose() + { + image.dispose(); + for (int i = 0; i < (cfg.cols * cfg.rows); i++) + tiles[i].dispose(); + tilesToDraw.clear(); + for (int i = 0, n = nextAnimations.size(); i < n; i++) + nextAnimations.get(i).dispose(); + animations.clear(); + for (int i = 0, n = animations.size(); i < n; i++) + animations.get(i).dispose(); + animations.clear(); + } + public float getWidth() { return image.getWidth(); |