diff --git a/core/src/com/me/brickbuster/BrickBuster.java b/core/src/com/me/brickbuster/BrickBuster.java index 238f1f9..409b3c8 100644 --- a/core/src/com/me/brickbuster/BrickBuster.java +++ b/core/src/com/me/brickbuster/BrickBuster.java @@ -5,7 +5,7 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.math.Vector2; import com.me.brickbuster.entity.Ball; -import com.me.brickbuster.entity.Block; +import com.me.brickbuster.entity.Brick; import com.me.brickbuster.entity.Paddle; import java.util.ArrayList; @@ -21,19 +21,19 @@ public class BrickBuster extends ApplicationAdapter { private Ball ball; private Paddle paddle; - private ArrayList blocks; + private ArrayList bricks; private boolean playing = false; @Override public void create () { ball = new Ball(this); paddle = new Paddle(this); - blocks = new ArrayList(); + bricks = new ArrayList(); for (int col = 0; col < 13; col++) { for (int row = 0; row < 10; row++) { - int x = 15 + (col * (Block.BLOCK_WIDTH + 10)); - int y = 15 + Block.BLOCK_HEIGHT + (row * (Block.BLOCK_HEIGHT + 5)); - blocks.add(new Block(this, x, HEIGHT - y)); + int x = 15 + (col * (Brick.BLOCK_WIDTH + 10)); + int y = 15 + Brick.BLOCK_HEIGHT + (row * (Brick.BLOCK_HEIGHT + 5)); + bricks.add(new Brick(this, x, HEIGHT - y)); } } } @@ -45,7 +45,7 @@ public class BrickBuster extends ApplicationAdapter { Gdx.gl.glClearColor(0.5f,1,1,1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - for (Block block : blocks) { + for (Brick block : bricks) { block.render(); } @@ -82,7 +82,7 @@ public class BrickBuster extends ApplicationAdapter { return paddle; } - public ArrayList getBlocks() { - return blocks; + public ArrayList getBricks() { + return bricks; } } diff --git a/core/src/com/me/brickbuster/entity/Block.java b/core/src/com/me/brickbuster/entity/Brick.java similarity index 87% rename from core/src/com/me/brickbuster/entity/Block.java rename to core/src/com/me/brickbuster/entity/Brick.java index 4b43f90..4aa87f1 100644 --- a/core/src/com/me/brickbuster/entity/Block.java +++ b/core/src/com/me/brickbuster/entity/Brick.java @@ -4,12 +4,12 @@ import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType; import com.me.brickbuster.BrickBuster; -public class Block extends Entity { +public class Brick extends Entity { public static final Color BLOCK_COLOR = Color.FOREST; public static final int BLOCK_WIDTH = 50; public static final int BLOCK_HEIGHT = 15; - public Block(BrickBuster brickBuster, int x, int y) { + public Brick(BrickBuster brickBuster, int x, int y) { super(brickBuster, x, y); }