java.lang.Object
com.adventure.config.ApplicationConfig
- All Implemented Interfaces:
Config
Class that implements configuration object.
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationConfig
(Properties properties) Creates configuration object from a properties. -
Method Summary
Modifier and TypeMethodDescriptionApp title getter;Default setting folderint
Default display height.int
Default display width.double
Gets the probability that a monster attacks during a fight.double
Gets the probability that a monster dodges during a fight.int
Max dodges for the player.Default player stats getter.Properties getter.Gets storage service.Gets type of storage service.boolean
Tells if the window is resizable or not.
-
Constructor Details
-
ApplicationConfig
Creates configuration object from a properties.- Parameters:
properties
- Application properties loaded.- Throws:
ConfigurationException
- If some error occur while generating the configuration object.
-
-
Method Details
-
getDisplayWidth
public int getDisplayWidth()Description copied from interface:Config
Default display width.- Specified by:
getDisplayWidth
in interfaceConfig
- Returns:
- Initial display width.
-
getConfigFolder
Description copied from interface:Config
Default setting folder- Specified by:
getConfigFolder
in interfaceConfig
- Returns:
- The path (relative to the .jar) where saves and setting are contained
-
getDisplayHeight
public int getDisplayHeight()Description copied from interface:Config
Default display height.- Specified by:
getDisplayHeight
in interfaceConfig
- Returns:
- Initial display height.
-
isResizable
public boolean isResizable()Description copied from interface:Config
Tells if the window is resizable or not.- Specified by:
isResizable
in interfaceConfig
- Returns:
- True if the window is resizable, false otherwise.
-
getStorageServiceType
Description copied from interface:Config
Gets type of storage service.- Specified by:
getStorageServiceType
in interfaceConfig
- Returns:
- Type of the current storage service.
-
getStorageService
Description copied from interface:Config
Gets storage service.- Specified by:
getStorageService
in interfaceConfig
- Returns:
- Current storage service.
-
getMonsterAttackProbability
public double getMonsterAttackProbability()Description copied from interface:Config
Gets the probability that a monster attacks during a fight.- Specified by:
getMonsterAttackProbability
in interfaceConfig
- Returns:
- Monster attack probability.
-
getMonsterDodgeProbability
public double getMonsterDodgeProbability()Description copied from interface:Config
Gets the probability that a monster dodges during a fight.- Specified by:
getMonsterDodgeProbability
in interfaceConfig
- Returns:
- Monster dodges during a fight.
-
getAppTitle
Description copied from interface:Config
App title getter;- Specified by:
getAppTitle
in interfaceConfig
- Returns:
- Default app title.
-
getPlayerStats
Description copied from interface:Config
Default player stats getter.- Specified by:
getPlayerStats
in interfaceConfig
- Returns:
- Default player stats.
-
getPlayerMaxDodges
public int getPlayerMaxDodges()Description copied from interface:Config
Max dodges for the player.- Specified by:
getPlayerMaxDodges
in interfaceConfig
- Returns:
- Max dodges for the player.
-
getProperties
Description copied from interface:Config
Properties getter.- Specified by:
getProperties
in interfaceConfig
- Returns:
- Current properties.
-