diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-29 16:49:11 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-29 16:49:11 +0200 |
commit | d314ab2da61edd9326f9d364ea439964e6a00a80 (patch) | |
tree | c15946a29170eee0d4f90b8d0b914568386380d3 /core/src/ch/asynk/rustanddust/game/map | |
parent | 350b658cc2469988040747cd17cbf370ed23946c (diff) | |
download | RustAndDust-d314ab2da61edd9326f9d364ea439964e6a00a80.zip RustAndDust-d314ab2da61edd9326f9d364ea439964e6a00a80.tar.gz |
Map4Orders: add prepareReplayLastTurn()
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/map')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/map/Map4Orders.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java index 269f0e7..ff0e01f 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java @@ -133,6 +133,15 @@ public abstract class Map4Orders extends Map3Animations } } + public void prepareReplayLastTurn() + { + int s = orders.size(); + while (s > 0) { + s -= 1; + replayOrders.add(orders.get(s)); + } + } + public Order stepReplay() { int s = replayOrders.size(); |