Skip to content

Instantly share code, notes, and snippets.

@xenda
Created November 21, 2009 16:25
Show Gist options
  • Save xenda/240194 to your computer and use it in GitHub Desktop.
Save xenda/240194 to your computer and use it in GitHub Desktop.
Sorteando las tarjetas :)
def xenda_tinka
#los jugadores
partners = ["Angel","Alvaro","Daniel"].sort_by { rand }
#los premios
cards = %w(165 165 170)
#chocolateamos
cards = cards.sort_by { rand }
#y los ganadores son....
3.times do
puts "#{partners.pop} se lleva #{cards.pop} tarjetas"
end
end
xenda_tinka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment