Rock Paper Scissors Simulator 2

Run some MiniScript code right in your browser!

//A Rock, Paper and Scissors (or RPS) simulator list.any = function() return self[rnd * self.len] end function facts = ["...RPS has its origins in China?", "...RPS is also played in Brazil and has the same name (but in portuguese)?", "...the Japaneses have made a robotic hand that plays RPS and always wins?", "...some Japanese researches have taught chimpanzees to play RPS?", "...the common side-blotched lizard (Uta stansburiana) exhibits a rock–paper–scissors pattern in its mating strategies?"] list = ["Rock", "Paper", "Scissors"] choice = list.any print "Type ""Rock"", ""paper"" or ""Scissors"" and see if you win!" pap = input("Rock, paper, scissors, shoot!") print "You choose " + pap.upper + "!" print "The opponent choose " + choice.upper + "!" if choice.upper == "ROCK" and pap.upper == "SCISSORS" then print "Rock crushes Scissors! OPPONENT WINS!" else if choice.upper == "ROCK" and pap.upper == "ROCK" then print "A TIE!" else if choice.upper == "PAPER" and pap.upper == "ROCK" then print "Paper covers Rock! OPPONENT WINS!" else if choice.upper == "PAPER" and pap.upper == "PAPER" then print "A TIE!" else if choice.upper == "SCISSORS" and pap.upper == "SCISSORS" then print "A TIE!" else if choice.upper == "SCISSORS" and pap.upper == "PAPER" then print "Scissors cuts Paper! OPPONENT WINS!" else if pap.upper == "ROCK" and choice.upper == "SCISSORS" then print "Rock crushes Scissors! YOU WIN!" else if pap.upper == "SCISSORS" and choice.upper == "PAPER" then print "Scissors cuts Paper! YOU WIN!" else if pap.upper == "PAPER" and choice.upper == "ROCK" then print "Paper covers Rock! YOU WIN!" end if print "" print "Mini Facts:" print "You knew that..." print facts.any

Help & Information