public static String getWinner(String player1Choice, String player2Choice) {
    String result = "";
    if (!elements.contains(player1Choice) || !elements.contains(player2Choice)) {
      throw new RuntimeException("Invalid value");
    }

    if (player1Choice.equals(player2Choice)) {
      result = "It is a tie!";
      tie++;
      total++;
    } else if (player2Choice == ROCK && player1Choice != PAPER) {
      result = "Rock wins!";
      userWon++;
      total++;
    } else if (player2Choice == PAPER && player1Choice != SCISSORS) {
      result = "Paper wins!";
      userWon++;
      total++;
    } else if (player2Choice == SCISSORS && player1Choice != ROCK) {
      result = "Scissors wins!";
      userWon++;
      total++;
    } else {
      result = player1Choice + " wins!";
      total++;
    }

    return result;

  }