📄 bricks.java
字号:
/**
* Add a comment
*/
import java.awt.*;
public class Bricks {
//You may find some of these constants helpful
//when creating the bricks
public static final Rectangle INVISIBLE_BRICK = new Rectangle(0, 0, 0, 0);
private static final Color BORDER_COLOUR = Color.BLUE;
public static final Color[] brickColours = {Color.CYAN, Color.RED, Color.MAGENTA, Color.YELLOW, Color.ORANGE, Color.BLUE, Color.WHITE };
public static final int BALL_SIZE = BreakOutConstants.BALL_SIZE;
public static final int BRICK_WIDTH = BALL_SIZE * 3;
public static final int BRICK_HEIGHT = BRICK_WIDTH/5;
public static final int BRICKS_IN_ROW = 6;
public static final int TOTAL_NUMBER_OF_BRICKS = BRICKS_IN_ROW * 1;
public static final int FIRST_BRICK_LEFT = BreakOutConstants.GAME_AREA.x + (BreakOutConstants.GAME_AREA.width - TOTAL_NUMBER_OF_BRICKS * BRICK_WIDTH)/2 ;
public static final int BACK_ROW_GAP = BALL_SIZE * 2;
public static final int BACK_ROW_Y = BreakOutConstants.GAME_AREA.y + BACK_ROW_GAP;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -