diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/Board.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Board.java b/core/src/ch/asynk/rustanddust/engine/Board.java index f1e1583..1bc11c9 100644 --- a/core/src/ch/asynk/rustanddust/engine/Board.java +++ b/core/src/ch/asynk/rustanddust/engine/Board.java @@ -385,7 +385,17 @@ public abstract class Board implements Disposable, Animation o = o.opposite(); boolean r = to.roadFrom(o); int c = to.costFrom(pawn, o); - if ((c < cost) || (r && (c == cost))) { + if ( + // cheaper or same cost and ... + (c < cost) || ((c == cost) && ( + // now road or same and ... + (!road && r) || ((road == r) && ( + // nicer looking move + (o == Orientation.SOUTH || o == Orientation.NORTH) + )) + )) + ) + { entry = o; cost = c; road = r; |