Ad
  • Default User Avatar

    It is a short hand if else statment. Each of the statments
    (p1 + p2).equals("scissorspaper") || (p1 + p2).equals("rockscissors") || (p1 + p2).equals("paperrock")
    are all conditions of the if statament and if any of them are met then the player that wins will be 1.

    When it says int p = at the start it is stating what will the 1 : 2 equal after the if statment.