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 Brick extends Gobj<Rectangle> {

    private final BrickColor _color;
    private final Capsule _capsule;
    private boolean _isAlive;

    Brick(Point position, BrickColor color, Capsule capsule) {
        super(position);
        _color = color;
        _capsule = capsule;
        _isAlive = true;
    }

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

    public void interact(Gobj other) {
        if (other instanceof Ball) {
            _capsule.release(getPosition());
            _isAlive = false;
        } else if (other instanceof MovementKillerBrick){
            _isAlive = false;
        }
    }


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

    public BrickColor getColor() {
        return _color;
    }
}

@@ -280,24 +280,54 @@
 e _capsule;%0A
+    private final int _score;%0A
     private 
@@ -481,24 +481,45 @@
  = capsule;%0A
+        _score = 50;%0A
         _isA
@@ -878,16 +878,79 @@
 %0A    %7D%0A%0A
+    public int getScore() %7B%0A        return this._score;%0A    %7D%0A%0A
 %0A    @Ov

Add basic brick color