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 TypeMethodDescriptionvoid
addBotManager
(BotManager botManager) void
addTurnHistory
(BotManager botManager, TurnHistory turnHistory) copy()
boolean
Returns a map of the latest history item for each bot manager in the history.int
hashCode()
void
setCurrentBotManagerUUID
(UUID currentBotManagerUUID) void
updateHistoryStatistics
(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, values
Methods 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:
equals
in interfaceMap<UUID,
List<TurnHistory>> - Overrides:
equals
in classAbstractMap<UUID,
List<TurnHistory>>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceMap<UUID,
List<TurnHistory>> - Overrides:
hashCode
in classAbstractMap<UUID,
List<TurnHistory>>
-
getHistoryStatistics
-