class Technologie{
    constructor(nom) {
        this.nom = nom
    }

    async chargerDepuisBdd(style) {
        let data = await fetch("../bdd/arbre.json")
        data = await data.json()
        this.props = data["technologies"][this.nom];
        this.cout = this.props.cout;
        this.boost = this.props.boost;
        if (style) {
            this.appliquerAmeliorationStyle();
        }
    }

    appliquerAmeliorationStyle(){
        document.getElementById("link-css").setAttribute("href","css/"+this.props.css_id)
    }


}