Class BubbleRewardModel

java.lang.Object
model.itemesAndRewards.ItemModel
model.itemesAndRewards.BubbleRewardModel

public class BubbleRewardModel extends ItemModel
Represents a bubble reward item in the game.

The `BubbleRewardModel` class extends the ItemModel class and represents a specific type of item that provides rewards to the player.

  • Constructor Details

    • BubbleRewardModel

      public BubbleRewardModel(int x, int y, Constants.Items.BubbleRewardType bubbleRewardType)
      Constructs a new BubbleRewardModel with the specified position and reward type.
      Parameters:
      x - the x-coordinate of the reward
      y - the y-coordinate of the reward
      bubbleRewardType - the type of bubble reward
  • Method Details

    • addPoints

      public void addPoints()
      Adds points to the player's score based on the type of bubble reward.
      Specified by:
      addPoints in class ItemModel
    • applyEffect

      public void applyEffect()
      Applies the effect of the item to the player.

      Note: Bubble rewards do not apply effects to the player.

      Specified by:
      applyEffect in class ItemModel
    • getBubbleRewardType

      public Constants.Items.BubbleRewardType getBubbleRewardType()
      Returns the type of bubble reward.
      Returns:
      the type of bubble reward