diff --git a/core/src/com/me/brickbuster/BrickBuster.java b/core/src/com/me/brickbuster/BrickBuster.java index 409b3c8..920e035 100644 --- a/core/src/com/me/brickbuster/BrickBuster.java +++ b/core/src/com/me/brickbuster/BrickBuster.java @@ -60,6 +60,10 @@ public class BrickBuster extends ApplicationAdapter { } ball.update(dt); paddle.update(dt); + if (getBricks().isEmpty()) { + create(); + playing = false; + } } @Override diff --git a/core/src/com/me/brickbuster/entity/Ball.java b/core/src/com/me/brickbuster/entity/Ball.java index 9768613..c2c721c 100644 --- a/core/src/com/me/brickbuster/entity/Ball.java +++ b/core/src/com/me/brickbuster/entity/Ball.java @@ -51,6 +51,9 @@ public class Ball extends Entity { if (nearest.dst(new_pos.x, new_pos.y) <= RADIUS) { brickIterator.remove(); + if (getBrickBuster().getBricks().size() <= 39) { + speed = 8; + } Utils.reflect(direction, segment.nor()); brick_collision = true; break;