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;

public abstract class Beam extends Gobj<Rectangle> {

    private boolean _isAlive;

    Beam(Point position) {
        super(position);
        _isAlive = true;
    }

    @Override
    public GobjKind getKind() {
        return GobjKind.Beam;
    }

    public void interact(Gobj other) {

    }

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

}

@@ -239,16 +239,40 @@
 isAlive;
+%0A    private Room _room;
 %0A%0A    Be
@@ -288,16 +288,27 @@
 position
+, Room room
 ) %7B%0A    
@@ -353,16 +353,38 @@
 = true;%0A
+        _room = room;%0A
     %7D%0A%0A 
@@ -541,51 +541,596 @@
 lic 
-boolean isAlive() %7B%0A        return _isAlive
+Rectangle getShape() %7B%0A        int height = getHeight();%0A        Size size = new Size(1, height);%0A        return new Rectangle(getPosition(), size);%0A    %7D%0A%0A    @Override%0A    public boolean isAlive() %7B%0A        return _isAlive;%0A    %7D%0A%0A    private int getHeight() %7B%0A        _room.getGobjs().stream().filter(obj -%3E obj instanceof Brick).forEach(obj -%3E %7B%0A            Brick brick = (Brick) obj;%0A            Point brickPosition = brick.getPosition();%0A            //Todo get lowest brick position at piont.Y%0A        %7D);%0A        //Todo return distance from lowest brick to paddle%0A        return 10
 ;%0A  

Add Beam size demo version