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 distance
      static class  Constants.LogLevel
      This enum contains all the levels used for logging
      static 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 calculations
      static boolean APPEND_LOGS
      Append to the logs if true or make a new log if false
      static int CELL_PIXELS
      The size in pixels of the cells
      static int CHESTS
      The amount of chests to draw, if less than 2 the game cannot be won
      static int ENEMIES
      The amount of enemies to draw
      static boolean ENEMY_AI
      Whether or not the enemies should be controlled by AI
      static boolean EXPORT_SCENE
      Exports the scene to a JSON file if true
      static java.awt.Font FONT
      The big font to use
      static int FONT_SIZE
      The font size to use
      static boolean GENERATE_SCENE
      Generates the scene manually instead of from the JSON file if true
      static boolean GLOBAL_LOG
      Use a global log if true or individual logs if false
      static int HORIZONTAL_CELLS
      The number of cells to draw horizontally
      static boolean LOG_TO_FILE
      Make logs
      static int OBSTACLES
      The amount of obstacles to draw on the screen
      static Constants.PlayerAIType PLAYER_AI
      Which type of AI to use
      static boolean PRETTY_JSON
      Use pretty JSON if true
      static java.lang.String TITLE
      The name of the game
      static int VERTICAL_CELLS
      The number of cells to draw vertically
      static 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 debugging
      default void initializeLogger​(java.lang.Class<?> logClass)
      Initialize the logger and assign a html handler
      default int random​(int min, int max)
      Generate a random number between given min and max
    • Field Detail

      • AI_HEURISTIC

        static final Constants.AIHeuristic AI_HEURISTIC
        The heuristic to use in the AI distance calculations
      • ENEMY_AI

        static final boolean ENEMY_AI
        Whether or not the enemies should be controlled by AI
        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
      • OBSTACLES

        static final int OBSTACLES
        The amount of obstacles to draw on the screen
      • 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
      • 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 logger
        logLevel - 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 range
        max - 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