View Javadoc

1   package de.jos.game;
2   
3   import java.awt.Color;
4   
5   public interface Constants {
6   
7     // modes - enum !
8     public static final Integer MODE_INFINITE = Integer.valueOf(1);
9     public static final Integer MODE_PUZZLE = Integer.valueOf(2);
10  
11    // screen size
12    public static final int WINDOW_WIDTH = 640;
13    public static final int WINDOW_HEIGHT = 480;
14  
15    public static final int PROGRESSBAR_BORDER = 2;
16    public static final int PROGRESSBAR_WINDOW_BORDERX = 100;
17    public static final int PROGRESSBAR_WINDOW_BORDERY = WINDOW_HEIGHT - 100;
18    public static final int PROGRESSBAR_HEIGHT = 20;
19  
20    // board borders
21    public static final int LEFT_BORDER = 2;
22    public static final int TOP_BORDER = 2;
23    public static final int RIGHT_BORDER = 2;
24    public static final int BOTTOM_BORDER = 2;
25  
26    // board width and height
27    public static final int BOARD_WIDTH_X = 13;
28    public static final int BOARD_WIDTH_Y = 13;
29  
30    // innere ausmasse des boards
31    public static final int PUZZLE_SPRITE_WIDTH_X = 9;
32    public static final int PUZZLE_SPRITE_WIDTH_Y = 9;
33  
34    // status of the bullet
35    // public static final Integer STATUS_BIG = Integer.valueOf(0);
36    // public static final Integer STATUS_SMALL = Integer.valueOf(1);
37  
38    // is the bullet moving ?
39    // public static final boolean MOVING_NO = false;
40    // public static final boolean MOVING_YES = true;
41  
42    // possible colors (incomplete)
43    // TODO color enum
44    public static final Integer COLOR_BLUE = Integer.valueOf(0);
45    public static final Integer COLOR_RED = Integer.valueOf(1);
46    public static final Integer COLOR_YELLOW = Integer.valueOf(2);
47    public static final Integer COLOR_PINK = Integer.valueOf(3);
48    public static final Integer COLOR_GREEN = Integer.valueOf(4);
49    // not yet used
50    public static final Integer COLOR_ORANGE = Integer.valueOf(5);
51    public static final Integer COLOR_VIOLET = Integer.valueOf(6);
52    public static final Integer COLOR_CYAN = Integer.valueOf(7);
53  
54    // sprite width, height
55    public static final int SPRITE_WIDTH = 36;
56    public static final int SPRITE_HEIGHT = 36;
57  
58    // x-, y- offsets
59    public static final int X_OFFSET = 1;
60    public static final int Y_OFFSET = 2;
61  
62    public static final int LEVEL_ADVANCEMENT_HEIGHT = 9 * SPRITE_HEIGHT;
63    public static final int LEVEL_ADVANCEMENT_WIDTH = 9 * SPRITE_WIDTH;
64    public static final int LEVEL_ADVANCEMENT_X_OFFSET = X_OFFSET + 2 * SPRITE_WIDTH;
65    public static final int LEVEL_ADVANCEMENT_Y_TARGET = Y_OFFSET + 2 * SPRITE_HEIGHT + (9 * SPRITE_WIDTH) / 2;
66  
67    // moegliche : 1.5, 1, 3, 4, 6
68    public static final double MOVING_FACTOR = 6;
69  
70    // transparency for dissolve
71    public static final float TRANSPARENCY_INIT = 1.0f;
72    public static final float TRANSPARENCY_INCREMENT = -0.02f;
73  
74    // diff has to be at least MOVE_DIFF pixels to take into consideration
75    public static final int MOVE_DIFF = 36;
76  
77    // mouse states
78    public static final int MOUSE_STATE_PRESSED = 0;
79    public static final int MOUSE_STATE_NOT_PRESSED = 1;
80  
81    // position where the solve score is to be displayed
82    public static final int LEVEL_SOLVE_SCORE_X = 300;
83    public static final int LEVEL_SOLVE_SCORE_Y = 200;
84  
85    // inifinite level time for the game
86    public static final int GAME_TIME_SECONDS_WARNING = 90;
87    public static final int GAME_TIME_SECONDS = 330;
88  
89    // default background color
90    public static final Color DEFAULT_BACKGROUND_COLOR = new Color(0, 0, 0);
91  
92  }