sacha.serny 3 years ago
parent
commit
052db05d30
  1. 13
      app.js
  2. 6
      index.html

13
app.js

@ -39,20 +39,15 @@ function regle() {
document.body.appendChild(button);
}
*/
function jeu() {
var machine_coins = 1000
var player_coins = 100
while (player_coins > 0) {
userinput = prompt() // a dev
function jeu() {
if (player_coins > 0) {
userinput = document.getElementById("mise").value // a dev
console.log(userinput)
while (userinput > 100 || userinput < 0) {
console.log("A")
// Ask
}
var tirage = [nbAlea(), nbAlea(), nbAlea()]
console.log(tirage)
gain(tirage)
}
}

6
index.html

@ -7,7 +7,11 @@
<title>Document</title>
</head>
<body>
<h1 onclick="regle()">MACHINE A SOUS NSI</h1>
<h1 onclick="">MACHINE A SOUS NSI</h1>
<form action="">
<input type="text" id="mise">
<input onclick="jeu()" type="button" value="Submit" id="valider">
</form>
<script src="app.js"></script>
</body>
</html>
Loading…
Cancel
Save