package ge.edu.freeuni.sdp.arkanoid.model;

import ge.edu.freeuni.sdp.arkanoid.model.geometry.Point;
import ge.edu.freeuni.sdp.arkanoid.model.geometry.Rectangle;
import ge.edu.freeuni.sdp.arkanoid.model.geometry.Shape;
import ge.edu.freeuni.sdp.arkanoid.model.geometry.Size;

public class FrameBrick extends Brick {
    private final Size _size;

    public FrameBrick(Point position, Size size) {
        super(position, BrickColor.Gold, new NullCapsule(position));
        _size = size;
    }

    @Override
    public Shape getShape() {
        return new Rectangle(getPosition(), _size);
    }

    @Override
    public boolean isAlive() {
        return true;
    }

}

@@ -665,10 +665,528 @@
 %0A    %7D%0A%0A
+    @Override%0A    public void interact(Gobj other) %7B%0A        super.interact(other);%0A%0A        if (other instanceof Paddle) %7B%0A            Point paddlePosition = other.getPosition();%0A            Size paddleSize = ((Rectangle) other.getShape()).getSize();%0A%0A            Point barrierPosition = this.getPosition();%0A%0A            if (barrierPosition.X %3C 0) %7B%0A                paddlePosition.X = 0;%0A            %7D else %7B%0A                paddlePosition.X = barrierPosition.X - paddleSize.getWidth();%0A            %7D%0A        %7D%0A    %7D%0A
 %7D%0A

Fix paddle leaving game bounds (ver 2) #35