Class Difficulty

java.lang.Object
com.csse3200.game.areas.difficulty.Difficulty

public class Difficulty extends Object
Difficulty class that should be registered in ServiceLocator and computes the float ready to be input into NPC Factory when spawning enemies in rooms
  • Constructor Details

    • Difficulty

      public Difficulty(DifficultyType diffType)
      Constructor, requires a set diffType from the difficultyType enum
  • Method Details

    • getRoomDifficulty

      public float getRoomDifficulty(float roomDifficulty)
      Get a float scaler to be input directly into NPC Factory functions. Requires a roomDifficulty float that expects the float as a whole number from the range 1 - 10 (not required to be a whole number or in this range but the formula works best when done like this)
      Parameters:
      roomDifficulty - float, expected whole number 1 - 10
      Returns:
      float that should be input directly into NPC factory
    • toString

      public String toString()
      Overrides:
      toString in class Object