Package javatro.core
Class PlanetCard
java.lang.Object
javatro.core.PlanetCard
Represents a planet card associated with a specific poker hand type. Each card provides chip and
multiplier increments and can be leveled up to increase these bonuses. Maintains static level
tracking for all hand types.
Predefined cards are initialized statically and accessed through factory methods. Level management affects all instances of a particular hand type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<PokerHand.HandType,Integer> Maps each poker hand type to its current enhancement level. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply()Enhances this card's associated hand type by one level.intstatic intgetChipIncrement(PokerHand.HandType handType) Calculates total chip increment for a hand type at its current level.static PlanetCardgetForHand(PokerHand.HandType handType) Retrieves the predefined planet card for a specific hand type.static intgetLevel(PokerHand.HandType handType) Gets current enhancement level for a hand type.intstatic intgetMultiIncrement(PokerHand.HandType handType) Calculates total multiplier increment for a hand type at its current level.getName()getPath()
-
Field Details
-
LEVELS
Maps each poker hand type to its current enhancement level. Initialized to level 1 for all hand types.
-
-
Method Details
-
getForHand
Retrieves the predefined planet card for a specific hand type.- Parameters:
handType- Poker hand type to look up- Returns:
- Associated planet card instance
- Throws:
AssertionError- if no card exists for the specified hand type
-
getLevel
Gets current enhancement level for a hand type.- Parameters:
handType- Poker hand type to check- Returns:
- Current level (minimum 1)
-
getChipIncrement
public int getChipIncrement()- Returns:
- Base chip increment without level scaling
-
getChipIncrement
Calculates total chip increment for a hand type at its current level.- Parameters:
handType- Poker hand type to check- Returns:
- Total chip value including level scaling
-
getMultiIncrement
public int getMultiIncrement()- Returns:
- Base multiplier increment without level scaling
-
getMultiIncrement
Calculates total multiplier increment for a hand type at its current level.- Parameters:
handType- Poker hand type to check- Returns:
- Total multiplier value including level scaling
-
apply
public void apply()Enhances this card's associated hand type by one level. Affects all instances using this hand type. -
getName
- Returns:
- Planetary display name
-
getHandType
- Returns:
- Associated poker hand type
-
getPath
- Returns:
- Resource path for planetary visualization
-