mirror of
https://github.com/10h30/odin-rock-paper-scissor.git
synced 2026-07-11 18:56:01 +09:00
Using loop
This commit is contained in:
@@ -42,7 +42,7 @@ function playRound() {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "PAPER" :
|
||||
switch (computerChoice.toUpperCase()) {
|
||||
case "ROCK" :
|
||||
@@ -82,11 +82,9 @@ function playRound() {
|
||||
|
||||
function playGames() {
|
||||
//playRound(humanSelection, computerSelection);
|
||||
playRound();
|
||||
playRound();
|
||||
playRound();
|
||||
playRound();
|
||||
playRound();
|
||||
for (let i = 0; i < 5; i++) {
|
||||
playRound();
|
||||
}
|
||||
if (humanScore > computerScore) {
|
||||
console.log("You Win!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user