From 8d311f820ee1b00a6f9f3ec870ef7fb24c1536e9 Mon Sep 17 00:00:00 2001 From: alexsosnovsky <60436249+alexsosnovsky@users.noreply.github.com> Date: Thu, 24 Mar 2022 22:35:32 -0400 Subject: [PATCH] Setnext for random map order Signed-off-by: alexsosnovsky <60436249+alexsosnovsky@users.noreply.github.com> --- core/src/main/java/tc/oc/pgm/rotation/RandomMapOrder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/tc/oc/pgm/rotation/RandomMapOrder.java b/core/src/main/java/tc/oc/pgm/rotation/RandomMapOrder.java index ad0340587d..678124581b 100644 --- a/core/src/main/java/tc/oc/pgm/rotation/RandomMapOrder.java +++ b/core/src/main/java/tc/oc/pgm/rotation/RandomMapOrder.java @@ -67,9 +67,11 @@ public MapInfo getNextMap() { return getNextMap(); } - // Setting a map requires no special actions from the RandomMapOrder @Override - public void setNextMap(MapInfo map) {} + public void setNextMap(MapInfo map) { + // Set next maps are sent to the front of the deque + deque.addFirst(new WeakReference<>(map)); + } @Override public void resetNextMap() {