Class ChestCell


  • public class ChestCell
    extends InteractionCell
    Special type of Interaction cell that holds an inventory
    • Field Detail

      • chestInventory

        private final java.util.LinkedList<Item> chestInventory
      • showItem

        private boolean showItem
      • isActive

        private boolean isActive
    • Constructor Detail

      • ChestCell

        public ChestCell​(int x,
                         int y,
                         java.lang.String inventory,
                         Dialog dialog,
                         Map map,
                         WindowOfFreeMove window,
                         boolean paint)
      • ChestCell

        public ChestCell​(int x,
                         int y,
                         java.lang.String inventory,
                         Dialog dialog,
                         Map map,
                         WindowOfFreeMove window)
    • Method Detail

      • fillChest

        private void fillChest​(java.lang.String inventory)
        Fills chest with item from file
        Parameters:
        inventory - name of inventory file
      • putItemToInventory

        private void putItemToInventory()
        Puts an item in Players inventory
      • isActive

        public boolean isActive()
      • setActive

        public void setActive​(boolean active)
      • getPaint

        public boolean getPaint()
      • getShowItem

        public boolean getShowItem()