diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 12:15:58 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 12:15:58 +0100 |
commit | 0857206ad6691a4fd46a67d110e511dad141d642 (patch) | |
tree | 48ae1c4142b9f38e629dcfae4c671327489edb97 /core | |
parent | ab1d8a6cb84e26aacbece5bcb84ae302baffcf2b (diff) | |
download | RustAndDust-0857206ad6691a4fd46a67d110e511dad141d642.zip RustAndDust-0857206ad6691a4fd46a67d110e511dad141d642.tar.gz |
Board: findBestEntry(...) returns Orientation, not Tile
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 28e5c6a..78629f9 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -344,10 +344,10 @@ public abstract class Board implements Disposable return assists.size(); } - public Tile findBestEntry(Pawn pawn, Tile to, Orientation from) + public Orientation findBestEntry(Pawn pawn, Tile to, Orientation from) { // FIXME board corners - Tile entry = null; + Orientation entry = Orientation.KEEP; int cost = Integer.MAX_VALUE; boolean road = false; @@ -355,7 +355,7 @@ public abstract class Board implements Disposable boolean r = to.road(o); int c = to.costFrom(pawn, o); if ((c < cost) || (r && (c == cost))) { - entry = getAdjTileAt(to, o); + entry = o; cost = c; road = r; } @@ -364,7 +364,7 @@ public abstract class Board implements Disposable r = to.road(o); c = to.costFrom(pawn, o); if ((c < cost) || (r && (c == cost))) { - entry = getAdjTileAt(to, o); + entry = o; cost = c; road = r; } @@ -373,7 +373,7 @@ public abstract class Board implements Disposable r = to.road(o); c = to.costFrom(pawn, o); if ((c < cost) || (r && (c == cost))) { - entry = getAdjTileAt(to, o); + entry = o; cost = c; road = r; } |