class Score extends Sprite {
    constructor(x, y) {
        super(x, y, 0, 0);
        this.score = 0;
        this.isUI = true; 
    }

    update() { return false; }

    draw(ctx) {
        ctx.fillStyle = 'black';
        ctx.font = '20px Arial';
        ctx.fillText(`Score: ${this.score}`, this.x, this.y);
    }

    add(points) {
        this.score += points;
    }
}
