diff --git a/js/element.js b/js/element.js index 764e429..867a3a3 100644 --- a/js/element.js +++ b/js/element.js @@ -1,11 +1,15 @@ class element{ - constructor(tag,id) { + constructor(techno,tag) { this.tag = tag - this.id = id + this.techno = techno } - afficher(){ - + charger_depuis_bdd(){ + fetch("../bdd/arbre.json").then((data,r)=>{ + let props = data["technologies"][this.techno][this.tag] + this.cout = props.cout + this.boost = props.boost + }) } } \ No newline at end of file