summaryrefslogtreecommitdiffstats
path: root/test/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/ch')
-rw-r--r--test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java38
-rw-r--r--test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java2
2 files changed, 18 insertions, 22 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java b/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java
index b964668..af6a856 100644
--- a/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java
+++ b/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java
@@ -127,33 +127,29 @@ public class AnimationsScreen extends AbstractScreen
private Path buildPath(final GdxBoardTest app)
{
Tile.defaultOverlay = app.assets.getAtlas(app.assets.HEX_OVERLAYS);
- Vector2 v = new Vector2();
Path path = Path.obtain();
path.ensureCapacity(10);
- board.centerOf(7, 4, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(6, 4, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(5, 3, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(5, 2, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(6, 2, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(7, 2, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(8, 3, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(9, 4, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(8, 4, v);
- path.add(new Tile(v.x, v.y));
- board.centerOf(7, 4, v);
- path.add(new Tile(v.x, v.y));
+ addTile(path, 7, 4);
+ addTile(path, 6, 4);
+ addTile(path, 5, 3);
+ addTile(path, 5, 2);
+ addTile(path, 6, 2);
+ addTile(path, 7, 2);
+ addTile(path, 8, 3);
+ addTile(path, 9, 4);
+ addTile(path, 8, 4);
+ addTile(path, 7, 4);
path.setFinalOrientation(Orientation.NE);
return path;
}
+ private void addTile(Path path, int x, int y)
+ {
+ final Vector2 v = new Vector2();
+ board.centerOf(x, y, v);
+ path.add(new Tile(x, y, v.x, v.y));
+ }
+
private AnimationBatch getFireAnimationBatch()
{
AnimationBatch batch = AnimationBatch.obtain(3);
diff --git a/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java b/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java
index 8388959..d20e52a 100644
--- a/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java
+++ b/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java
@@ -150,7 +150,7 @@ public class BoardScreen extends AbstractScreen
{
final Vector2 v = new Vector2();
board.centerOf(x, y, v);
- return new Tile(v.x, v.y);
+ return new Tile(x, y, v.x, v.y);
}
public void setHEX_V()