From 5ee36005c1d18a3c673c280c786b2a724c037636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 19 Jan 2015 11:52:43 +0100 Subject: Board: strongly link getAdjTileAt() with getSide() --- core/src/ch/asynk/tankontank/engine/Board.java | 12 ++++++------ 1 file 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) -- cgit v1.1-2-g2b99