Pieces = ['rock', 'paper', 'scissors']def play a,b = rand(3),rand(3) case ((b-a).abs) when 0; puts "The Lianator got a tie with #{Pieces[b]}, but will win next time for sure" else; case (b-a) when 1,-2; puts "The Lianator won with #{Pieces[b]} against #{Pieces[a]}" when -1,2; puts "The Lianator lost with #{Pieces[b]} against #{Pieces[a]}, but will win next time" end endend(puts 'alligator.rb (--help | number of iterations)'; exit) if '--help' == ARGV[0] or nil == ARGV[0](ARGV[0] ||= 1).to_i.times do play end