Skip to content

Commit 2c01e3b

Browse files
committed
chore: format RockPaperScissors.java with clang-format
1 parent 8697b53 commit 2c01e3b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/main/java/com/thealgorithms/puzzlesandgames/RockPaperScissors.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,9 @@ public static void main(String[] args) {
5858
private static String getResult(String userChoice, String computerChoice) {
5959
if (userChoice.equals(computerChoice)) {
6060
return "It's a tie!";
61-
} else if (
62-
(userChoice.equals("rock") && computerChoice.equals("scissors")) ||
63-
(userChoice.equals("scissors") && computerChoice.equals("paper")) ||
64-
(userChoice.equals("paper") && computerChoice.equals("rock"))
65-
) {
61+
} else if ((userChoice.equals("rock") && computerChoice.equals("scissors")) || (userChoice.equals("scissors") && computerChoice.equals("paper")) || (userChoice.equals("paper") && computerChoice.equals("rock"))) {
6662
return "You win! :D ";
67-
} else {
63+
} else
6864
return "You lose! :( ";
69-
}
7065
}
71-
}
66+
}

0 commit comments

Comments
 (0)