Compare commits

...

2 Commits

Author SHA1 Message Date
jean-lou.saulnier 554705727a update js machine à sous 3 years ago
saulnier.j 00ce702ac8 avance du js 3 years ago
  1. 8
      Index.html
  2. 35
      main.js
  3. 26
      test.html

8
Index.html

@ -12,7 +12,11 @@
</head> </head>
<body> <body>
<<<<<<< HEAD
<img src="logo.jpeg">
=======
<img class=logo src="image/logo.png"> <img class=logo src="image/logo.png">
>>>>>>> 3383835b05463931dd62f7429baf70f24d275ae5
<div class="loader"> <div class="loader">
@ -21,11 +25,13 @@
<span class="lettre">7</span> <span class="lettre">7</span>
<span class="lettre">7</span> <span class="lettre">7</span>
</div> </div>
<<<<<<< HEAD
=======
>>>>>>> 3383835b05463931dd62f7429baf70f24d275ae5
<script src="loading.js"></script> <script src="loading.js"></script>
<script src="main.js"></script> <script src="main.js"></script>

35
main.js

@ -1,19 +1,28 @@
let machine_sous = new Object(); //let machine_sous = new Object();
//machine_sous.argent = int(input("Saississez votre somme de départ: ")) let argent
machine_sous.nombres = [] let nombres = []
machine_sous.bank = 1000 let bank = 1000
machine_sous.mise = -1 let mise
machine_sous.gains = 0 let gains = 0
function controle(){ function start(){
var saisie = document.getElementById("input").value; argent = document.getElementById("input").value;
alert("Vous avez saisi : "+ saisie); regle();
test();
} }
function test(taille){ function test(){
for(let i=0; i<taille; i++){ console.log(argent)
console.log(i)
} }
function regle(){
console.log("les règles sont ..............");
console.log("Mais aussi ça .............");
} }
test(15); function saisie(){
mise = document.getElementById("argent").value;
bank += mise;
argent -= mise;
console.log(bank)
}

26
test.html

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<img src="logo.jpeg">
<input type="text" id="input" name="input" value=""><br>
<input type="button" id="bouton" value="Contrôler" onclick="start()"><br><br>
<input type="text" id="argent" name="argent" value=""><br>
<input type="button" id="bouton" value="Contrôler" onclick="saisie()">
<script src="main.js"></script>
</body>
</html>
Loading…
Cancel
Save