diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-09 09:35:48 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-09 09:35:48 +0200 |
commit | 8d854c03f09c21895692d77d6900e062cee487f1 (patch) | |
tree | 68ff893bbf74229311832bf3f20417bf14cff2ab /core/src/ch/asynk/gdx | |
parent | 3eef4dae35c7b939c2c8ede377f6274b6a67d81c (diff) | |
download | gdx-boardgame-8d854c03f09c21895692d77d6900e062cee487f1.zip gdx-boardgame-8d854c03f09c21895692d77d6900e062cee487f1.tar.gz |
Piece : add roadMarchBonus(), reorder code
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Piece.java | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Piece.java b/core/src/ch/asynk/gdx/boardgame/Piece.java index 5f47309..970bf8a 100644 --- a/core/src/ch/asynk/gdx/boardgame/Piece.java +++ b/core/src/ch/asynk/gdx/boardgame/Piece.java @@ -29,6 +29,27 @@ public class Piece implements Drawable, Positionable, Rotable, Scalable setHead(texture); } + public int getAvailableMP() + { + return 0; + } + + public int moveCost(Tile from, Tile to, Orientation orientation) + { + // Integer.MAX_VALUE means impracticable + return Integer.MAX_VALUE; + } + + public boolean atLeastOneTileMove() + { + return true; + } + + public int roadMarchBonus() + { + return 0; + } + public void setHead(Texture texture) { sprite = new Sprite(texture); @@ -123,20 +144,4 @@ public class Piece implements Drawable, Positionable, Rotable, Scalable float h = getHeight(); shapeRenderer.rect(getX(), getY(), (w / 2f), (h / 2f), w, h, sprite.getScaleX(), sprite.getScaleY(), getRotation()); } - - public int getAvailableMP() - { - return 0; - } - - public int moveCost(Tile from, Tile to, Orientation orientation) - { - // Integer.MAX_VALUE means impracticable - return Integer.MAX_VALUE; - } - - public boolean atLeastOneTileMove() - { - return true; - } } |