diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-22 12:05:03 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-22 12:05:03 +0200 |
commit | 6f0054a030b5c38346940d871343b3238bb5eb1e (patch) | |
tree | bd0da4ff22b2cce84870375ee9cdeca47f0b1d4c /core/src/ch | |
parent | 6b75f8772de1783643ca7825226b1a6b844793ac (diff) | |
download | RustAndDust-6f0054a030b5c38346940d871343b3238bb5eb1e.zip RustAndDust-6f0054a030b5c38346940d871343b3238bb5eb1e.tar.gz |
code reorder
Diffstat (limited to 'core/src/ch')
-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(); |