diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-19 11:33:30 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-19 11:33:30 +0100 |
commit | d6454053de6941d08b66c131f0d06ea9a11ae5f0 (patch) | |
tree | 112a5a648ac7df58baad56bb2314de7e56a1c571 /core | |
parent | 1860b7d50173e73f977ffaaa26a4a2fecb55bb38 (diff) | |
download | RustAndDust-d6454053de6941d08b66c131f0d06ea9a11ae5f0.zip RustAndDust-d6454053de6941d08b66c131f0d06ea9a11ae5f0.tar.gz |
Board: setAdjacentTiles() uses getAdjTileAt()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index f95375c..6cd2053 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -180,12 +180,12 @@ public abstract class Board implements Disposable, Animation public void setAdjacentTiles(Tile tile, Tile tiles[]) { - tiles[0] = getTile((tile.col - 1), (tile.row)); - tiles[1] = getTile((tile.col), (tile.row + 1)); - tiles[2] = getTile((tile.col + 1), (tile.row + 1)); - tiles[3] = getTile((tile.col + 1), (tile.row)); - tiles[4] = getTile((tile.col), (tile.row - 1)); - tiles[5] = getTile((tile.col - 1), (tile.row - 1)); + tiles[0] = getAdjTileAt(tile, Orientation.SOUTH); + tiles[1] = getAdjTileAt(tile, Orientation.SOUTH_WEST); + tiles[2] = getAdjTileAt(tile, Orientation.NORTH_WEST); + tiles[3] = getAdjTileAt(tile, Orientation.NORTH); + tiles[4] = getAdjTileAt(tile, Orientation.NORTH_EAST); + tiles[5] = getAdjTileAt(tile, Orientation.SOUTH_EAST); } public Tile getAdjTileAt(Tile tile, Orientation o) |