Class LevelCollection

java.lang.Object
blockly_robot.robot.logic.level.LevelCollection

public class LevelCollection extends Object
Die Tests (Level) nach Schwierigkeitsgraden geordnet. Represents a collection of levels categorized by difficulty.
  • Constructor Details

  • Method Details

    • getLevels

      public Map<Difficulty,List<Level>> getLevels()
    • getNumberOfLevels

      public int getNumberOfLevels()
    • getMaxRows

      public int getMaxRows()
    • getMaxCols

      public int getMaxCols()
    • getNumberOfDifficulties

      public int getNumberOfDifficulties()
    • getLevel

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

      public Level getLevel(Difficulty difficulty)
      Retrieves the level for the specified difficulty.
      Parameters:
      difficulty - the difficulty of the level to retrieve
      Returns:
      the level for the specified difficulty
    • getLevel

      public Level getLevel(int difficulty)
      Retrieves the level with the specified difficulty.
      Parameters:
      difficulty - the difficulty level of the level to retrieve
      Returns:
      the level with the specified difficulty
    • filter

      public Map<Difficulty,List<Level>> filter(Predicate<Difficulty> difficulty, Predicate<Level> level)
    • filter

      public Map<Difficulty,List<Level>> filter(Predicate<Difficulty> difficulty)
    • filter

      public Map<Difficulty,List<Level>> filter()
    • filter

      public Map<Difficulty,List<Level>> filter(Object difficulty, int testIndex)
    • filter

      public Map<Difficulty,List<Level>> filter(Object difficulty)
    • getMaxColsOfList

      public static int getMaxColsOfList(List<Level> levels)