Package javatro.core

Class PlanetCard

java.lang.Object
javatro.core.PlanetCard

public class PlanetCard extends Object
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 Details

    • LEVELS

      public static final Map<PokerHand.HandType,Integer> LEVELS
      Maps each poker hand type to its current enhancement level. Initialized to level 1 for all hand types.
  • Method Details

    • getForHand

      public static PlanetCard getForHand(PokerHand.HandType handType)
      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

      public static int getLevel(PokerHand.HandType handType)
      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

      public static int getChipIncrement(PokerHand.HandType handType)
      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

      public static int getMultiIncrement(PokerHand.HandType handType)
      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

      public String getName()
      Returns:
      Planetary display name
    • getHandType

      public PokerHand.HandType getHandType()
      Returns:
      Associated poker hand type
    • getPath

      public String getPath()
      Returns:
      Resource path for planetary visualization