0
JavaScript Game. Need help
Hello. I am doing school homework and I have to make a rock paper scissors game. I have done the basics like what happens when you choose rock, paper or scissors but I don't know how to make a limit of the score and a restart button. I would appreciate the help. Thanks!
1 Antwort
0
every time you win you get some score like + 10
and the limit score is 100 you can write like this
if(score == 100) {
alert("you won");
var sayyes = confirm("do you wanna restart the game?");
if(true){
game();
}
}
and restart button
you making a function game() and putting all code inside it. then if game is finished you write a confirm alert and if its true you starting your function again
sry bad english