diff --git a/app.js b/app.js index 0bbe622..b64ed48 100644 --- a/app.js +++ b/app.js @@ -20,8 +20,7 @@ function rotate(rouleau, angle){ let i = 0; let interval = setInterval(() => { if (i >= angle){ - rouleau.style.transform = 'rotate3d(1,0,0,'+angle+'deg)'; - clearInterval(interval); + clearInterval(interval); } else { i += 9; @@ -41,6 +40,7 @@ function tirette(){ document.getElementById('tirette').style.transform = 'rotate3d(1,0,0,'+(360-i)+'deg)'; } else { + document.getElementById('tirette').style.transform = 'rotate3d(1,0,0,'+i+'deg)'; } i += 9; @@ -50,9 +50,10 @@ function tirette(){ function tirage(){ let numbers = [nbAlea(), nbAlea(), nbAlea()] - rotate(document.getElementsByClassName("cube")[0], (Math.floor(Math.random()*15)*360) - (numbers[0]*36)); - rotate(document.getElementsByClassName("cube")[1], (Math.floor(Math.random()*15)*360) - (numbers[1]*36)); - rotate(document.getElementsByClassName("cube")[2], (Math.floor(Math.random()*15)*360) - (numbers[2]*36)); + console.log(numbers); + rotate(document.getElementsByClassName("cube")[0], Math.floor(Math.random()*(15-1)+1)*360 - numbers[0]*36); + rotate(document.getElementsByClassName("cube")[1], Math.floor(Math.random()*(15-1)+1)*360 - numbers[1]*36); + rotate(document.getElementsByClassName("cube")[2], Math.floor(Math.random()*(15-1)+1)*360 - numbers[2]*36); return numbers } @@ -88,16 +89,16 @@ function gain(tirage){ if(tirage[0] == 9 && tirage[1] == 9 && tirage[2] == 9){ - return bac + return game.bac } else if(tirage[0] == tirage[1] && tirage[1] == tirage[2]){ - return mise*6 + return game.mise*6 } else if(tirage[0] == tirage[1] || tirage[0] == tirage[2] || tirage[1] == tirage[2]){ - return mise*3 + return game.mise*3 } return 0 } diff --git a/index.html b/index.html index 32ccf00..dca9391 100644 --- a/index.html +++ b/index.html @@ -54,14 +54,12 @@ +

Banque : 1000

Vous :

- - -
Règles diff --git a/master.css b/master.css index 237d524..bffcc81 100644 --- a/master.css +++ b/master.css @@ -32,28 +32,41 @@ body{ } #rouleau_1{ - left: 42.65%; + left: 42.65vw; } #rouleau_2{ - left: 47.05%; + left: 47.05vw; } #rouleau_3{ - left: 51.5%; + left: 51.5vw; } #tirette{ position: absolute; z-index: 10; - margin-left: 30.6%; + margin-left: 58vw; + top: 3vw; transform-origin: 70% 58%; } -img { +#tirage{ display: flex; justify-content: space-around; margin: auto; position: relative; - width: 42.4%; + width: 42.4vw; +} + +#mise_input{ + position: absolute; + top: 27vw; + left: 42vw; + width: 13vw; + height: 2vw; + border-radius: 20px; + border: none; + box-shadow: 0px 0px 37px black; + } diff --git a/tirette.png b/tirette.png index 2ef8fa7..170956c 100644 Binary files a/tirette.png and b/tirette.png differ