Package cl.cromer.azaraka
Interface Constants
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Constants.AIHeuristic
The different heuristics that the AI uses to calculate distancestatic class
Constants.LogLevel
This enum contains all the levels used for loggingstatic class
Constants.PlayerAIType
The different AI that can be used by the player
-
Field Summary
Fields Modifier and Type Field Description static Constants.AIHeuristic
AI_HEURISTIC
The heuristic to use in the AI distance calculationsstatic boolean
APPEND_LOGS
Append to the logs if true or make a new log if falsestatic int
CELL_PIXELS
The size in pixels of the cellsstatic int
CHESTS
The amount of chests to draw, if less than 2 the game cannot be wonstatic int
ENEMIES
The amount of enemies to drawstatic boolean
ENEMY_AI
Whether or not the enemies should be controlled by AIstatic boolean
EXPORT_SCENE
Exports the scene to a JSON file if truestatic java.awt.Font
FONT
The big font to usestatic int
FONT_SIZE
The font size to usestatic boolean
GENERATE_SCENE
Generates the scene manually instead of from the JSON file if truestatic boolean
GLOBAL_LOG
Use a global log if true or individual logs if falsestatic int
HORIZONTAL_CELLS
The number of cells to draw horizontallystatic boolean
LOG_TO_FILE
Make logsstatic int
OBSTACLES
The amount of obstacles to draw on the screenstatic Constants.PlayerAIType
PLAYER_AI
Which type of AI to usestatic boolean
PRETTY_JSON
Use pretty JSON if truestatic java.lang.String
TITLE
The name of the gamestatic int
VERTICAL_CELLS
The number of cells to draw verticallystatic int
VOLUME
The default volume between 0 and 100
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.logging.Logger
getLogger(java.lang.Class<?> logClass, Constants.LogLevel logLevel)
Get a logger object to use for debuggingdefault void
initializeLogger(java.lang.Class<?> logClass)
Initialize the logger and assign a html handlerdefault int
random(int min, int max)
Generate a random number between given min and max
-
-
-
Field Detail
-
TITLE
static final java.lang.String TITLE
The name of the game- See Also:
- Constant Field Values
-
AI_HEURISTIC
static final Constants.AIHeuristic AI_HEURISTIC
The heuristic to use in the AI distance calculations
-
PLAYER_AI
static final Constants.PlayerAIType PLAYER_AI
Which type of AI to use
-
ENEMY_AI
static final boolean ENEMY_AI
Whether or not the enemies should be controlled by AI- See Also:
- Constant Field Values
-
LOG_TO_FILE
static final boolean LOG_TO_FILE
Make logs- See Also:
- Constant Field Values
-
GLOBAL_LOG
static final boolean GLOBAL_LOG
Use a global log if true or individual logs if false- See Also:
- Constant Field Values
-
APPEND_LOGS
static final boolean APPEND_LOGS
Append to the logs if true or make a new log if false- See Also:
- Constant Field Values
-
CELL_PIXELS
static final int CELL_PIXELS
The size in pixels of the cells- See Also:
- Constant Field Values
-
HORIZONTAL_CELLS
static final int HORIZONTAL_CELLS
The number of cells to draw horizontally- See Also:
- Constant Field Values
-
VERTICAL_CELLS
static final int VERTICAL_CELLS
The number of cells to draw vertically- See Also:
- Constant Field Values
-
CHESTS
static final int CHESTS
The amount of chests to draw, if less than 2 the game cannot be won- See Also:
- Constant Field Values
-
ENEMIES
static final int ENEMIES
The amount of enemies to draw- See Also:
- Constant Field Values
-
OBSTACLES
static final int OBSTACLES
The amount of obstacles to draw on the screen
-
VOLUME
static final int VOLUME
The default volume between 0 and 100- See Also:
- Constant Field Values
-
GENERATE_SCENE
static final boolean GENERATE_SCENE
Generates the scene manually instead of from the JSON file if true- See Also:
- Constant Field Values
-
EXPORT_SCENE
static final boolean EXPORT_SCENE
Exports the scene to a JSON file if true- See Also:
- Constant Field Values
-
PRETTY_JSON
static final boolean PRETTY_JSON
Use pretty JSON if true- See Also:
- Constant Field Values
-
FONT_SIZE
static final int FONT_SIZE
The font size to use- See Also:
- Constant Field Values
-
FONT
static final java.awt.Font FONT
The big font to use
-
-
Method Detail
-
getLogger
default java.util.logging.Logger getLogger(java.lang.Class<?> logClass, Constants.LogLevel logLevel)
Get a logger object to use for debugging- Parameters:
logClass
- The class that is in need of a loggerlogLevel
- What log level to use- Returns:
- Returns the logger
-
random
default int random(int min, int max)
Generate a random number between given min and max- Parameters:
min
- Minimum number in rangemax
- Maximum number in range- Returns:
- Returns a random number
-
initializeLogger
default void initializeLogger(java.lang.Class<?> logClass)
Initialize the logger and assign a html handler- Parameters:
logClass
- The class to be initialized
-
-