summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index f6d28bb..f40a6b8 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -519,6 +519,18 @@ public abstract class Board implements Disposable
pawn.move(cost);
}
+ protected void rotatePawn(final Pawn pawn, Orientation o, RunnableAnimation whenDone)
+ {
+ Vector3 p = pawn.getPosition();
+ Vector3 v = vector3Pool.obtain();
+ v.set(p.x, p.y, o.r());
+ AnimationSequence seq = pawn.getRotateAnimation(v);
+ seq.addAnimation(whenDone);
+ addPawnAnimation(pawn, seq);
+ vector3Pool.free(v);
+ pawn.rotate(o);
+ }
+
protected void revertLastPawnMove(final Pawn pawn, RunnableAnimation whenDone)
{
removePawnFrom(pawn, getHexAt(pawn.getCenter()));
@@ -535,18 +547,6 @@ public abstract class Board implements Disposable
pawn.revertLastMove();
}
- protected void rotatePawn(final Pawn pawn, Orientation o, RunnableAnimation whenDone)
- {
- Vector3 p = pawn.getPosition();
- Vector3 v = vector3Pool.obtain();
- v.set(p.x, p.y, o.r());
- AnimationSequence seq = pawn.getRotateAnimation(v);
- seq.addAnimation(whenDone);
- addPawnAnimation(pawn, seq);
- vector3Pool.free(v);
- pawn.rotate(o);
- }
-
public GridPoint2 getHexAt(Vector2 v)
{
if (v == null) return null;