mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Ensure caches cleared between games
This commit is contained in:
@@ -164,8 +164,6 @@ public class MatchUtil {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
gameViews.clear();
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int avatarIndex = 0;
|
int avatarIndex = 0;
|
||||||
humanCount = 0;
|
humanCount = 0;
|
||||||
@@ -393,6 +391,12 @@ public class MatchUtil {
|
|||||||
if (game == null) { return; }
|
if (game == null) { return; }
|
||||||
|
|
||||||
game = null;
|
game = null;
|
||||||
|
gameViews.clear();
|
||||||
|
players.clear();
|
||||||
|
cards.clear();
|
||||||
|
spabs.clear();
|
||||||
|
stackItems.clear();
|
||||||
|
|
||||||
controller.afterGameEnd();
|
controller.afterGameEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,4 +157,9 @@ public class Cache<K extends IIdentifiable, V extends IIdentifiable> {
|
|||||||
cache.keySet().retainAll(Collections2.transform(keys, IIdentifiable.FN_GET_ID));
|
cache.keySet().retainAll(Collections2.transform(keys, IIdentifiable.FN_GET_ID));
|
||||||
inverseCache.values().retainAll(keys);
|
inverseCache.values().retainAll(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
cache.clear();
|
||||||
|
inverseCache.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user