File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
src/main/java/com/thealgorithms/puzzlesandgames Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments