export default class Debris {
    constructor(x, y) {
        this.position = {x: x, y: y};
        this.orientation = Math.random() < .5 ? 0.5 : - 0.5;
        this.alive = true;
    }

    update() {

    };

    draw(screen) {
        screen.addCall(
            this.position.x, this.position.y,
            this.position.x + this.position.y - this.orientation,
            () => {
                screen.ctx.fillStyle = '#b86';
                screen.ctx.transform(1, this.orientation, 0, 1, 0, 0);
                screen.ctx.fillRect(-10, -10, 10, 20);
            }
        );
        screen.addCall(
            this.position.x, this.position.y,
            this.position.x + this.position.y + this.orientation,
            () => {
                screen.ctx.fillStyle = '#b86';
                screen.ctx.transform(1, this.orientation, 0, 1, 0, 0);
                screen.ctx.fillRect(0, -10, 10, 20);
            }
        );
    }
}

@@ -349,32 +349,40 @@
 this.orientation
+ + 0.001
 ,%0A            ()
@@ -719,16 +719,24 @@
 entation
+ + 0.001
 ,%0A      

add tiebreaker for debris and ship z fighting