summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-19 17:06:10 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-19 17:06:10 +0100
commitc09ff7038f642df06f3597cf72fe3739bfcce3f5 (patch)
tree477fad20774a10e969025077f579f682a1874baa /core
parent0b57bfb1840d0020634c413ef6d4a0f2d88ced99 (diff)
downloadRustAndDust-c09ff7038f642df06f3597cf72fe3739bfcce3f5.zip
RustAndDust-c09ff7038f642df06f3597cf72fe3739bfcce3f5.tar.gz
Hex: Orientation.KEEP move -> stay -> cost 0
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index f1ba86a..c1ef21a 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -108,6 +108,7 @@ public class Hex extends Tile
@Override
public int costFrom(Pawn pawn, Orientation side)
{
+ if (side == Orientation.KEEP) return 0;
if (hasUnits()) return (Integer.MAX_VALUE / 2);
if (road(side)) return 1;