Class StoreRoom

java.lang.Object
rooms.Room
rooms.StoreRoom

public class StoreRoom extends Room
Represents a store room where the player can purchase items.

This room contains multiple MysteryBox items, each with a fixed cost. Players can collect these items if they have enough coins.

  • Field Details

  • Constructor Details

    • StoreRoom

      public StoreRoom(double x, double y, double w, double h, Player player)
      Constructs a StoreRoom with specified position, size, and player reference.

      Spawns three MysteryBox items in fixed positions within the room.

      Parameters:
      x - the x-coordinate of the top-left corner of the room
      y - the y-coordinate of the top-left corner of the room
      w - the width of the room
      h - the height of the room
      player - the player in this room