Class Item

java.lang.Object
blockly_robot.robot.logic.item.Item

public class Item extends Object
Ein Gegenstand auf dem Gitter.
See Also:
  • Constructor Details

  • Method Details

    • setPosition

      public void setPosition(int row, int col)
    • getNum

      public int getNum()
      Gibt die Nummer (ID) des Gegenstands.
    • getType

      public String getType()
      Gibt den eindeutigen Namen, der den Gegenstand identifiziert. Zum Beispiel: candle
    • isContainer

      public boolean isContainer()
      Gibt an, ob der Gegenstand eine Kiste darstellt.
    • getFilePath

      public String getFilePath()
      Returns the file path of the item.
      Returns:
      The file path in the format "images//contexts/{img}".
    • isExit

      public boolean isExit()
      Gibt an, ob der Gegenstand einen Ausgang darstellt.
    • isLaser

      public boolean isLaser()
      Gibt an, ob der Gegenstand einen Laser darstellt.
    • isObstacle

      public boolean isObstacle()
      Gibt an, ob der Gegenstand ein Hindernis darstellt.
    • isPaint

      public boolean isPaint()
    • isProjectile

      public boolean isProjectile()
      Gibt an, ob der Gegenstand einen Wurfkörper darstellt.
    • isPushable

      public boolean isPushable()
      Gibt an, ob der Gegenstand eine Kiste darstellt.
    • setController

      public void setController(ItemController controller)
    • isRobot

      public boolean isRobot()
      Gibt an, ob der Gegenstand einen Roboter darstellt.
    • isWithdrawable

      public boolean isWithdrawable()
      Gibt an, ob der Gegenstand eingesammelt werden kann.
    • isAutoWithdrawable

      public boolean isAutoWithdrawable()
    • add

      public void add(int row, int col)
    • add

      public void add()
    • move

      public void move(int row, int col)
    • withdraw

      public void withdraw()