Copy Copied! Back
def rsp i,j=%w(r s p),%w(%w(s p) %w(p r) %w(r s)) p "plz imput(r||s||p)" (x=gets.chomp)!=(y=i[rand(0...3)])? (return j[i.index(x)][0]==y ? "w!":"l!") : rsp end puts rsp