package break_out; import break_out.model.Position; import java.awt.Color; /** * A class that contains all constant values to configure the game * * @author dmlux, modified by I. Schumacher, modified by Gruppe 175: Ruben Meyer und Moritz Henseleit */ public class Constants { /** * The screen width in pixels */ public static final Integer SCREEN_WIDTH = 880; /** * The screen height in pixels */ public static final Integer SCREEN_HEIGHT = 750; /** * the application name */ public static final String APP_TITLE = "BreakOut"; /** * Debugging flag for special rendering hints */ public static final boolean DEBUG_MODE = false; /** * The background color for the game menu */ public static final Color BACKGROUND = new Color(52, 152, 219); /** * Amount of columns for blocks */ public static final Integer SQUARES_X = 22; /** * Amount of the rows */ public static final Integer SQUARES_Y = 30; /** * The paddle width in pixels */ public static final Integer PADDLE_WIDTH = 90; /** * The paddle height in pixels */ public static final Integer PADDLE_HEIGHT = 15; /** * The distance between paddle and the lower reflection offset. */ public static final Double REFLECTION_OFFSET = 25.0; /** * The ball diameter in pixels */ public static final Integer BALL_DIAMETER = 15; /** * The paddle speed */ public static final Double DX_MOVEMENT = 4.5; /** * The ball speed */ public static final Double BALL_SPEED = 1.20; /** * The background color for the field */ public static final Color COLOR_GAME_BACKGROUND = new Color(64, 45, 61); /** * The default component color */ public static final Color COLOR_COMPONENT = new Color(191, 105, 145); /** * The component color for the bottom paddle */ public static final Color COLOR_PADDLE_BOTTOM = new Color(242, 173, 148); /** * The component color for the top paddle */ public static final Color COLOR_PADDLE_TOP = new Color(242, 196, 141); /** * The component color for the text */ public static final Color COLOR_TEXT = new Color(0, 0, 0); /** * The component color for the scoreboard */ public static final Color COLOR_SCOREBOARD = new Color(140, 140, 140, 144); /** * The padding / offset of the scoreboard to the inner text elements */ public static final int SCOREBOARD_OFFSET = 15; /** * The string for the score on the scoreboard */ public static final String SCOREBOARD_SCORE = "Score: "; /** * The string for the lives on the scoreboard */ public static final String SCOREBOARD_LIVES = "Lives: "; /** * The position for the scoreboards midpoint (bottom center) */ public static final Position SCOREBOARD_MIDPOINT = new Position(SCREEN_WIDTH*5/6, SCREEN_HEIGHT); }