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

    • levels

      @Getter public Map<Difficulty,List<Level>> levels()
    • numberOfLevels

      @Getter public int numberOfLevels()
    • maxRows

      @Getter public int maxRows()
    • maxCols

      @Getter public int maxCols()
    • numberOfDifficulties

      @Getter public int numberOfDifficulties()
    • level

      @Getter public Level level(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
    • level

      @Getter public Level level(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
    • level

      @Getter public Level level(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)
    • maxColsOfList

      public static int maxColsOfList(List<Level> levels)