|
@ -43,11 +43,11 @@ function tirette(){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function tirage(){ |
|
|
function tirage(){ |
|
|
let numbers = [nbAlea()+1, nbAlea()+1, nbAlea()+1] |
|
|
let numbers = [nbAlea(), nbAlea(), nbAlea()] |
|
|
console.log(numbers) |
|
|
console.log(numbers); |
|
|
rotate(document.getElementsByClassName("cube")[0], Math.floor(Math.random() * 15)*360+(numbers[0]-1)*36) |
|
|
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]-1)*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]-1)*36) |
|
|
rotate(document.getElementsByClassName("cube")[2], (Math.floor(Math.random()*15)*360) - (numbers[2]*36)); |
|
|
return numbers |
|
|
return numbers |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|