You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.8 KiB
84 lines
2.8 KiB
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<script>
|
|
banque = 1000;
|
|
sous = 100;
|
|
function nbAlea() {
|
|
nbr1 = Math.floor(Math.random() * 10);
|
|
nbr2 = Math.floor(Math.random() * 10);
|
|
nbr3 = Math.floor(Math.random() * 10);
|
|
document.getElementById("PlaceNbr1").innerHTML = nbr1;
|
|
document.getElementById("PlaceNbr2").innerHTML = nbr2;
|
|
document.getElementById("PlaceNbr3").innerHTML = nbr3;
|
|
gain()
|
|
}
|
|
|
|
function gain() {
|
|
if (banque < 500) {
|
|
checkRefresh();
|
|
} else if (nbr1 == 9 && nbr2 == 9 && nbr3 == 9) {
|
|
result = "Bingo !";
|
|
sous = sous + banque;
|
|
banque = 0;
|
|
console.log("Bingo");
|
|
} else if (nbr1 == nbr2 && nbr2 == nbr3) {
|
|
result = "Mini Bingo !";
|
|
sous = sous + 6*Number(document.getElementById("searchbar").value);
|
|
banque = banque - 6*Number(document.getElementById("searchbar").value);
|
|
console.log("Mini Bingo");
|
|
} else if (nbr1 == nbr2) {
|
|
result = "Gagné !";
|
|
sous = sous + 3*Number(document.getElementById("searchbar").value);
|
|
banque = banque - 3*Number(document.getElementById("searchbar").value);
|
|
console.log("Gagné");
|
|
} else if (nbr1 == nbr3) {
|
|
result = "Gagné !";
|
|
sous = sous + 3*Number(document.getElementById("searchbar").value);
|
|
banque = banque - 3*Number(document.getElementById("searchbar").value);
|
|
console.log("Gagné");
|
|
} else if (nbr2 == nbr3) {
|
|
result = "Gagné !";
|
|
sous = sous + 3*Number(document.getElementById("searchbar").value);
|
|
banque = banque - 3*Number(document.getElementById("searchbar").value);
|
|
console.log("Gagné");
|
|
} else {
|
|
result = "Perdu !";
|
|
sous = sous - Number(document.getElementById("searchbar").value);
|
|
banque = banque + Number(document.getElementById("searchbar").value);
|
|
console.log("Perdu");
|
|
}
|
|
document.getElementById("Gain").innerHTML = result;
|
|
document.getElementById("Banque").innerHTML = banque;
|
|
document.getElementById("Sous").innerHTML = sous;
|
|
}
|
|
|
|
function checkRefresh() {
|
|
console.log("ARRET!");
|
|
window.location.reload();
|
|
}
|
|
|
|
function regles() {
|
|
document.location.href="règle.html";
|
|
}
|
|
</script>
|
|
<head>
|
|
<title> Unicron03 </title>
|
|
<link href="MachineASous.css" rel="stylesheet">
|
|
<link rel="icon" type="image/x-icon" href="EV.jpg" />
|
|
</head>
|
|
<body>
|
|
<h1 class="Menu"> Présentation </h1>
|
|
<table class="presentation">
|
|
<tr>
|
|
<td> <a href="https://www.instagram.com/unicron_e"> <img class="insta" src="logo_instagram.png" title="Logo_Instagram"> </a> </td>
|
|
<td rowspan="3"> <img class="logo" src="EV.jpg" title="Logo_profil"> </td>
|
|
</tr
|
|
<tr>
|
|
<td> <a href="mailto:enzo.vandepoele2@gmail.com"> <img class="insta" src="logo_mail.png" title="Logo_Mail"> </a> </td>
|
|
</tr>
|
|
<tr>
|
|
<td> <a href="https://github.com/Unicron03"> <img class="insta" src="logo_github.png" title="Logo_Github"> </a> </td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|