summaryrefslogtreecommitdiffstats
path: root/test/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-06-09 07:14:43 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-06-09 07:14:43 +0200
commit3eef4dae35c7b939c2c8ede377f6274b6a67d81c (patch)
tree5fc21d8f4a2688c5ebc6e78b10cbfbea8dabd978 /test/src/ch/asynk
parent0676f408a404c7afef27225dd81b6a8c952c4a98 (diff)
downloadgdx-boardgame-3eef4dae35c7b939c2c8ede377f6274b6a67d81c.zip
gdx-boardgame-3eef4dae35c7b939c2c8ede377f6274b6a67d81c.tar.gz
Piece : add atLeastOneTileMove()
Diffstat (limited to 'test/src/ch/asynk')
-rw-r--r--test/src/ch/asynk/gdx/boardgame/test/HexScreen.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java b/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java
index 0a1494c..e60ebe2 100644
--- a/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java
+++ b/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java
@@ -47,9 +47,10 @@ class Unit extends Piece
@Override public int moveCost(Tile from, Tile to, Orientation orientation)
{
+ Terrain dst = ((Hex)to).terrain;
+ if (dst == Terrain.HILL) return 3;
if (!hardTarget) return 1;
if (orientation.belongsTo(((Hex)from).roads)) return 1;
- Terrain dst = ((Hex)to).terrain;
if (dst.difficult()) return 2;
return 1;
}