From 0857206ad6691a4fd46a67d110e511dad141d642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 5 Nov 2014 12:15:58 +0100 Subject: Board: findBestEntry(...) returns Orientation, not Tile --- core/src/ch/asynk/tankontank/engine/Board.java | 10 +++++----- 1 file 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; } -- cgit v1.1-2-g2b99