- Ensure each of the test cases in the class RockPaperScissorsEvaluatorTest successfully passes upon completion of each of the method stubs in the class RockPaperScissorsEvaluator.
String getWinningMove(String handSign)
String getLosingMove(String handSign)
String getWinner(String handSignOfPlayer1, String handSignOfPlayer2)
- Description
- Given a String representative of a hand sign, named
handSign
, in Rock Paper Scissors, return the String representation of the hand sign which would defeat the respectivehandSign
.
- Given a String representative of a hand sign, named
-
Sample Script
// : Given RockPaperScissors rps = new RockPaperScissors(); String input = "rock"; // : When String outcome = rps.getWinningMove(input); // : Then System.out.println(outcome);
-
Sample Output
paper
- Description
- Given a String representative of a hand sign, named
handSign
, in Rock Paper Scissors, return the String representation of the hand sign which would be defeated by the respectivehandSign
.
- Given a String representative of a hand sign, named
-
Sample Script
// : Given RockPaperScissors rps = new RockPaperScissors(); String input = "rock"; // : When String outcome = rps.getLosingMove(input); // : Then System.out.println(outcome);
-
Sample Output
scissors
- Description
- Given two Strings, named
handSignOfPlayer1
, andhandSignOfPlayer2
, representative of the hand signs of two Rock Paper Scissor players, return the String representation of the hand sign which would be the victor.
- Given two Strings, named
-
Sample Script
// : Given RockPaperScissors rps = new RockPaperScissors(); String handSignOfPlayer1 = "rock"; String handSignOfPlayer2 = "paper"; // : When String outcome = rps.getWinner(handSignOfPlayer1, handSignOfPlayer2); // : Then System.out.println(outcome);
-
Sample Output
paper