summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-29 16:49:11 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-29 16:49:11 +0200
commitd314ab2da61edd9326f9d364ea439964e6a00a80 (patch)
treec15946a29170eee0d4f90b8d0b914568386380d3 /core/src/ch/asynk/rustanddust
parent350b658cc2469988040747cd17cbf370ed23946c (diff)
downloadRustAndDust-d314ab2da61edd9326f9d364ea439964e6a00a80.zip
RustAndDust-d314ab2da61edd9326f9d364ea439964e6a00a80.tar.gz
Map4Orders: add prepareReplayLastTurn()
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map4Orders.java9
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();