I\'m in an introductory software development class, and my homework is to create a rock paper scissors program that takes two arguments (rock, paper), etc, and returns the arg t
WINNAHS = [[:rock, :scissors], [:scissors, :paper], [:paper, :rock]] def winner(p1, p2) (WINNAHS.include?([p1,p2]) && p1) || (WINNAHS.include?([p2,p1]) && p2) || :tie end winner(:rock, :paper) #=> :paper winner(:scissors, :paper) #=> :scissors winner(:scissors, :scissors) #=> :tie