Package com.takenoko.asset
Class ImprovementDeck
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<ImprovementType,
Integer>
The deck containing all the improvement chips you can place on the tiles.
- 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 TypeMethodDescriptiondraw
(ImprovementType improvementType) boolean
int
hashCode()
boolean
hasImprovement
(ImprovementType improvementType) peek()
toString()
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
-
Field Details
-
DEFAULT_IMPROVEMENT_COUNT
private static final int DEFAULT_IMPROVEMENT_COUNT- See Also:
-
lastDrawnImprovement
-
-
Constructor Details
-
ImprovementDeck
public ImprovementDeck()
-
-
Method Details
-
draw
- Parameters:
improvementType
- what improvement type you choose to draw- Returns:
- the improvement type you choose to draw
-
hasImprovement
- Parameters:
improvementType
- the improvement type you want to know if available- Returns:
- true if the improvement type is available, false otherwise
-
equals
- Specified by:
equals
in interfaceMap<ImprovementType,
Integer> - Overrides:
equals
in classAbstractMap<ImprovementType,
Integer>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceMap<ImprovementType,
Integer> - Overrides:
hashCode
in classAbstractMap<ImprovementType,
Integer>
-
peek
-
toString
- Overrides:
toString
in classAbstractMap<ImprovementType,
Integer>
-