- added fix by JayDi for gameState().value and Lists.

This commit is contained in:
jeffwadsworth 2021-07-31 18:16:09 -05:00
parent 73db223ca7
commit df07ad4418
2 changed files with 2 additions and 3 deletions

View file

@ -172,6 +172,8 @@ public class GameState implements Serializable, Copyable<GameState> {
this.values.put(entry.getKey(), ((EnumSet) entry.getValue()).clone());
} else if (entry.getValue() instanceof HashMap) {
this.values.put(entry.getKey(), ((HashMap) entry.getValue()).clone());
} else if (entry.getValue() instanceof List) {
this.values.put(entry.getKey(), ((List) entry.getValue()).stream().collect(Collectors.toList()));
} else {
this.values.put(entry.getKey(), entry.getValue());
}