diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-09 07:14:43 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-09 07:14:43 +0200 |
commit | 3eef4dae35c7b939c2c8ede377f6274b6a67d81c (patch) | |
tree | 5fc21d8f4a2688c5ebc6e78b10cbfbea8dabd978 /test/src | |
parent | 0676f408a404c7afef27225dd81b6a8c952c4a98 (diff) | |
download | gdx-boardgame-3eef4dae35c7b939c2c8ede377f6274b6a67d81c.zip gdx-boardgame-3eef4dae35c7b939c2c8ede377f6274b6a67d81c.tar.gz |
Piece : add atLeastOneTileMove()
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/HexScreen.java | 3 |
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; } |