{"size": 673, "ext": "js", "max_stars_repo_path": "peg/built/piece.js", "max_stars_repo_name": "tinmarr/Solitaire", "max_stars_repo_stars_event_min_datetime": "2020-04-10T19:58:25.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-10T19:58:25.000Z", "max_issues_repo_path": "peg/built/piece.js", "max_issues_repo_name": "tinmarr/Solitaire", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "peg/built/piece.js", "max_forks_repo_name": "tinmarr/Solitaire", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.65, "max_line_length": 89, "alphanum_fraction": 0.5364041605}
class Piece {
    constructor(pos, visible) {
        this.visible = visible;
        this.pos = { ideal: pos, real: { x: 0, y: 0 } };
        this.visible = visible;
        if (visible) {
            this.sprite = scene.add.sprite(0, 0, 'piece').setInteractive();
            scene.input.setDraggable(this.sprite);
        }
        else {
            this.sprite = scene.add.sprite(0, 0, 'piece').setVisible(false);
        }
        this.calcReal();
    }
    calcReal() {
        this.pos.real = { x: 54 + this.pos.ideal.x * 82, y: 54 + this.pos.ideal.y * 82 };
        this.sprite.setX(this.pos.real.x).setY(this.pos.real.y);
    }
}
//# sourceMappingURL=piece.js.map