Class Task

java.lang.Object
blockly_robot.robot.logic.Task

public class Task extends Object
Eine Trainingsaufgabe (Task) besteht aus mehreren (in der Regel 3) Schwierigkeitsgraden (Difficulty). Ein Schwierigkeitsgrad kann einen oder mehrere Tests (Level) haben.
  • Constructor Details

    • Task

      public Task(String filePath)
  • Method Details

    • loadByTaskPath

      public static Task loadByTaskPath(String taskPath)
      Parameters:
      taskPath - Der relative Pfad zu resources/data/tasks
    • extractTaskPath

      public static String extractTaskPath(String path)
    • getTaskPath

      public String getTaskPath()
    • getData

      public TaskData getData()
    • getTitle

      public String getTitle()
    • getIntro

      public String getIntro()
    • getItemCreator

      public ItemCreator getItemCreator()
    • getBorderColor

      public String getBorderColor()
      Returns the grid color.
      Returns:
      the grid color as a String.
    • getBackgroundColor

      public String getBackgroundColor()
      Returns the background color.
      Returns:
      the background color as a String.
    • getBagSize

      public int getBagSize()
    • getMaxFallAltitude

      public int getMaxFallAltitude()
    • getNbPlatforms

      public int getNbPlatforms()
    • getLevels

      public Map<Difficulty,List<Level>> getLevels()
      Returns a map of difficulty levels and their corresponding list of levels.
      Returns:
      the map of difficulty levels and their corresponding list of levels
    • getLevel

      public Level getLevel(Difficulty difficulty, int test)
      Retrieves the level for a given difficulty and test.
      Parameters:
      difficulty - the difficulty of the task
      test - the test index (0 is the first test)
      Returns:
      the level corresponding to the given difficulty and test
    • getLevel

      public Level getLevel(Difficulty difficulty)
      Returns the level associated with the given difficulty.
      Parameters:
      difficulty - the difficulty of the task
      Returns:
      the level associated with the difficulty
    • getLevel

      public Level getLevel(int difficulty)
      Retrieves the level based on the given difficulty.
      Parameters:
      difficulty - the difficulty level as an integer (0 is easy, 1 is medium, 2 is hard)
      Returns:
      the corresponding level
    • getLevel

      public Level getLevel()
      Returns the first version of a training task with the easiest difficulty. / Gibt die erste Version einer Trainingsaufgabe mit dem leichtesten Schwierigkeitsgrad zurück.
    • getLevelCollection

      public LevelCollection getLevelCollection()
    • getContextData

      public Context getContextData()
    • getVirtualRobot

      public VirtualRobot getVirtualRobot()
      Returns the virtual robot of the first version of a training task with the easiest difficulty. / Gibt einen virtuellen Roboter der erste Version einer Trainingsaufgabe mit dem leichtesten Schwierigkeitsgrad zurück.
    • getMaxCols

      public int getMaxCols()
      Die Anzahl der Kacheln einer Spalte, des Tests (Level) mit der größten horizontalen Ausdehnung.
    • getMaxRows

      public int getMaxRows()
      Die Anzahl der Kacheln einer Zeile, des Tests (Level) mit der größten vertikalen Ausdehnung.
    • getNumberOfDifficulties

      public int getNumberOfDifficulties()
      Die Anzahl an Schwierigkeitsgraden (In der Regel 3).
    • getMaxLevelsPerDifficulty

      public int getMaxLevelsPerDifficulty()
      Die Anzahl der Tests des Schwierigkeitsgrads mit den meisten Tests.
    • getNumberOfLevels

      public int getNumberOfLevels()
      Die Anzahl aller Tests (Level).
    • hasGravity

      public boolean hasGravity()
    • getAutoWithdraw

      public boolean getAutoWithdraw()
    • getBagInit

      public BagInit getBagInit()