diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-19 11:52:43 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-19 11:52:43 +0100 |
commit | 5ee36005c1d18a3c673c280c786b2a724c037636 (patch) | |
tree | 7cf9aa324fe0c9798df8e6017d0babb56efb5660 /core/src/ch/asynk/tankontank/engine | |
parent | 4550f30ed838c61a0ba4db8c6db02c94ed477ee9 (diff) | |
download | RustAndDust-5ee36005c1d18a3c673c280c786b2a724c037636.zip RustAndDust-5ee36005c1d18a3c673c280c786b2a724c037636.tar.gz |
Board: strongly link getAdjTileAt() with getSide()
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-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 350be95..1ad4045 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] = 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); + tiles[0] = getAdjTileAt(tile, sides[0].opposite()); + tiles[1] = getAdjTileAt(tile, sides[1].opposite()); + tiles[2] = getAdjTileAt(tile, sides[2].opposite()); + tiles[3] = getAdjTileAt(tile, sides[3].opposite()); + tiles[4] = getAdjTileAt(tile, sides[4].opposite()); + tiles[5] = getAdjTileAt(tile, sides[5].opposite()); } public Tile getAdjTileAt(Tile tile, Orientation o) |