summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-10 11:57:10 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-10 11:57:10 +0200
commit2ec8db85412449125fb4918c80dcc71872a923bd (patch)
tree33b3976968f7391b15cd92afd2228a2292fb8c3f /core
parentc1a077c89c726ff239c9e5a502f04e7898c59554 (diff)
downloadRustAndDust-2ec8db85412449125fb4918c80dcc71872a923bd.zip
RustAndDust-2ec8db85412449125fb4918c80dcc71872a923bd.tar.gz
Board: code reordering
Diffstat (limited to 'core')
-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;