} public List<Brick> getBricks() { return bricks; } public void setBricks(List<Brick> bricks) { this.bricks = bricks; } public Arkanoid(int width, int height) { this.width = width; this.height = height; } public static void main(String [] args) {} public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } public void checkBricksBump() { for (int i = 0, bricksSize = bricks.size(); i < bricksSize;) { Brick currentBrick = bricks.get(i); if (currentBrick.isIntersec(ball)) { double angel = Math.random() * 360; ball.setDirection(angel); bricks.remove(currentBrick); break; } i++; } } public void checkStandBump () { if (ball.isIntersec(stand)) { double angle = 90 + 20 * (Math.random() - 0.5); ball.setDirection(angle); } } public void checkEndGame () { if (ball.getY() > height) { isGameOver = true; } } }