Package com.takenoko.engine
Class History
- All Implemented Interfaces:
Serializable,Cloneable,Map<UUID,List<TurnHistory>>
Class that stores the history of a game.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBotManager(BotManager botManager) voidaddTurnHistory(BotManager botManager, TurnHistory turnHistory) copy()booleanReturns a map of the latest history item for each bot manager in the history.inthashCode()voidsetCurrentBotManagerUUID(UUID currentBotManagerUUID) voidupdateHistoryStatistics(BotManager botManager) Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
toString
-
Field Details
-
currentBotManagerUUID
-
historyStatistics
-
-
Constructor Details
-
History
-
History
public History()
-
-
Method Details
-
getCurrentBotManagerUUID
-
setCurrentBotManagerUUID
-
addBotManager
-
addTurnHistory
-
updateHistoryStatistics
-
copy
-
getLatestHistoryItems
Returns a map of the latest history item for each bot manager in the history.- Returns:
- a map of the latest history item for each bot manager.
-
equals
- Specified by:
equalsin interfaceMap<UUID,List<TurnHistory>> - Overrides:
equalsin classAbstractMap<UUID,List<TurnHistory>>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceMap<UUID,List<TurnHistory>> - Overrides:
hashCodein classAbstractMap<UUID,List<TurnHistory>>
-
getHistoryStatistics
-