|
@ -32,16 +32,16 @@ function gain(x){ |
|
|
else if (resultat==2){ |
|
|
else if (resultat==2){ |
|
|
let jeton_joueur=5*nb_jet ; |
|
|
let jeton_joueur=5*nb_jet ; |
|
|
document.getElementById("demo").innerHTML = "vous avez "+jeton_joueur+" jetons"; |
|
|
document.getElementById("demo").innerHTML = "vous avez "+jeton_joueur+" jetons"; |
|
|
let jeton_bac-=5*nb_jet; |
|
|
var jeton_bac=jeton_bac-5*nb_jet; |
|
|
document.getElementById("demo").innerHTML = "vous avez "+jeton_bac+" jetons"; |
|
|
document.getElementById("demo").innerHTML = "vous avez "+jeton_bac+" jetons"; |
|
|
return jeton_joueur; |
|
|
return jeton_joueur; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
else if (resultat==3){ |
|
|
else if (resultat==3){ |
|
|
let jeton_joueur=jeton_joueur-nb_jet ; |
|
|
var jeton_joueur=jeton_joueur-nb_jet ; |
|
|
document.getElementById("demo").innerHTML = "vous avez "+jeton_joueur+" jetons"; |
|
|
document.getElementById("demo").innerHTML = "vous avez "+jeton_joueur+" jetons"; |
|
|
let jeton_bac=jeton_bac+nb_jet; |
|
|
var jeton_bac=jeton_bac+nb_jet; |
|
|
document.getElementById("demo").innerHTML = "il y a "+jeton_bac+" jetons dans la machine"; |
|
|
document.getElementById("demo").innerHTML = "<br>"+"il y a "+ jeton_bac +" jetons dans la machine"; |
|
|
return jeton_joueur; |
|
|
return jeton_joueur; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -55,15 +55,12 @@ function nbAlea(){ |
|
|
let cars = nbAlea(); |
|
|
let cars = nbAlea(); |
|
|
window.alert(cars); |
|
|
window.alert(cars); |
|
|
if(cars[0]==9&&cars[1]==9&&cars[2]==9){ |
|
|
if(cars[0]==9&&cars[1]==9&&cars[2]==9){ |
|
|
document.getElementById("demo").innerHTML = "simon est gays"; |
|
|
|
|
|
gain(1); |
|
|
gain(1); |
|
|
} |
|
|
} |
|
|
else if(cars[0]==cars[1]||cars[0]==cars[2]||cars[1]==cars[2]){ |
|
|
else if(cars[0]==cars[1]||cars[0]==cars[2]||cars[1]==cars[2]){ |
|
|
document.getElementById("demo").innerHTML = "bruno est gays"; |
|
|
|
|
|
gain(2); |
|
|
gain(2); |
|
|
} |
|
|
} |
|
|
else{ |
|
|
else if (cars[0]!=cars[1]||cars[0]!=cars[2]||cars[1]!=cars[2]){ |
|
|
document.getElementById("demo").innerHTML = "samuel est gays"; |
|
|
|
|
|
gain(3); |
|
|
gain(3); |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
@ -73,3 +70,7 @@ else{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|