This commit is contained in:
Justine Beau 2024-11-29 09:50:52 +01:00
commit a7a8b321af
6 changed files with 27 additions and 10 deletions

BIN
css/codevertmatrix.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
css/matrix.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

View file

@ -5,6 +5,7 @@ body {
color: #333; color: #333;
margin: 0; margin: 0;
padding: 30px; padding: 30px;
background-image: url(codevert.jpg);
} }

View file

@ -5,6 +5,7 @@ body {
color: #34495e; color: #34495e;
margin: 0; margin: 0;
padding: 40px; padding: 40px;
background-image: url(matrix.gif), url(codevert.jpg);
} }
h1, h2, h3 { h1, h2, h3 {

View file

@ -5,6 +5,7 @@ body {
color: #2c3e50; color: #2c3e50;
margin: 0; margin: 0;
padding: 50px; padding: 50px;
background-image: url(codevertmatrix.gif);
} }
h1, h2, h3 { h1, h2, h3 {

View file

@ -45,17 +45,31 @@ async function remplirMagasin(){
/* fonction qui va s'activer lorsqu'on achète l'objet*/ /* fonction qui va s'activer lorsqu'on achète l'objet*/
btn_acheter.addEventListener("click", (event) =>{ btn_acheter.addEventListener("click", (event) =>{
// on améliore le style de la page :)
t.appliquerAmeliorationStyle()
// et on ajouter l'amélioration dans l'abre des compétences débloquées
sacado[key] = true
// on refresh le magasin pour enlever l'amelioration de la liste // ne laisse acheter que si on a l'argent
// vide le ventre du magasin if(score >= t.cout){
table.innerHTML = "" // on améliore le style de la page :)
magasin = {} t.appliquerAmeliorationStyle()
remplirMagasin()
// et on ajouter l'amélioration dans l'abre des compétences débloquées
sacado[key] = true
// on refresh le magasin pour enlever l'amelioration de la liste
// vide le ventre du magasin
table.innerHTML = ""
magasin = {}
remplirMagasin()
// finalement, on lui débit son compte de points tel un vendeur de voitures
score -= t.cout
}else{
// PAS ASSEZ RICHE !!!!!
alert("PAS ASSEZ RICHE !!!!!!!!!!!!")
}
}) })