Browse Source

fin js et mise en place des casino

master
quipiq 3 years ago
parent
commit
61a129a3fe
  1. 17
      Index.html
  2. 15
      test_jl/main.js
  3. 31
      test_jl/test.css
  4. 1
      test_jl/test.html

17
Index.html

@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>casino 77</title> <title>casino 777</title>
<link rel="stylesheet" type="text/css" href="styles.css"> <link rel="stylesheet" type="text/css" href="styles.css">
</head> </head>
@ -37,21 +37,6 @@
<img class="img4" src="image/imgnoirbingo.png" onmouseover="this.src='image/bgcasino.jpg';" onmouseout="this.src='image/imgnoirbingo.png'" alt="" /> <img class="img4" src="image/imgnoirbingo.png" onmouseover="this.src='image/bgcasino.jpg';" onmouseout="this.src='image/imgnoirbingo.png'" alt="" />
<div class="bg"></div> <div class="bg"></div>
<script src="loading.js"></script> <script src="loading.js"></script>

15
test_jl/main.js

@ -56,6 +56,7 @@ function gain(nb){
function affiche(){ function affiche(){
console.log('Vous avez gagné %d jetons', gains); console.log('Vous avez gagné %d jetons', gains);
console.log('\nIl vous reste %d jetons, et il reste %d jetons dans le bac de la machine.\n', argent, bank); console.log('\nIl vous reste %d jetons, et il reste %d jetons dans le bac de la machine.\n', argent, bank);
gains=0;
} }
@ -77,18 +78,20 @@ document.querySelector("#spinner").addEventListener("click", spin);
async function spin() { async function spin() {
init(false, 1, 2); init(false, 1, 2);
for (const door of doors) { if(argent>0){
const boxes = door.querySelector(".boxes"); for (const door of doors) {
const duration = parseInt(boxes.style.transitionDuration); const boxes = door.querySelector(".boxes");
boxes.style.transform = "translateY(0)"; const duration = parseInt(boxes.style.transitionDuration);
await new Promise((resolve) => setTimeout(resolve, duration * 100)); boxes.style.transform = "translateY(0)";
await new Promise((resolve) => setTimeout(resolve, duration * 100));
}
} }
} }
function init(firstInit, groups, duration) { function init(firstInit, groups, duration) {
for (const door of doors) { for (const door of doors) {
const boxes = door.querySelector(".boxes"); const boxes = door.querySelector(".boxes");
const boxesClone = boxes.cloneNode(false); const boxesClone = boxes.cloneNode(false);
const pool = [""]; const pool = ["?"];
if (!firstInit) { if (!firstInit) {
const arr = []; const arr = [];
for (let n = 0; n < (groups > 0 ? groups : 1); n++) { for (let n = 0; n < (groups > 0 ? groups : 1); n++) {

31
test_jl/test.css

@ -1,13 +1,11 @@
#app { #app {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #212121;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 15%;
} }
.doors { .doors {
@ -35,7 +33,6 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 3rem; font-size: 3rem;
} }
@ -57,4 +54,30 @@ button {
bottom: 0; bottom: 0;
width: 100%; width: 100%;
text-align: center; text-align: center;
}
@font-face {
font-family: "Ma Super Fonte";
src: url('../casino.TTF');
}
body{
color: rgb(137,46,255);
font-family: "Ma Super Fonte";
text-shadow: 0 0 7px rgb(147,112,219),
0 0 25px rgb(147,112,219),
0 0 30px rgb(147,112,219),
0 0 35px rgb(147,112,219),
0 0 40px rgb(147,112,219),
0 0 50px rgb(147,112,219),
0 0 60px rgb(147,112,219)
}
h1{
color: rgb(137,46,255);
text-shadow: 0 0 7px rgb(147,112,219),
0 0 10px rgb(147,112,219),
0 0 25px rgb(147,112,219),
0 0 35px rgb(147,112,219),
0 0 45px rgb(147,112,219)
} }

1
test_jl/test.html

@ -36,6 +36,7 @@
<button id="spinner">Spin</button> <button id="spinner">Spin</button>
<!--<button id="reseter">Reset</button>--> <!--<button id="reseter">Reset</button>-->
</div> </div>
<input type="text" id="mise" name="mise"> <input type="text" id="mise" name="mise">

Loading…
Cancel
Save