Created
April 4, 2017 20:27
-
-
Save matiasgarciaisaia/0afbbde3a799d596f9188d42dfb4e50f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
participants = [ | |
"Bugs Bunny (@bugsbunny)", | |
"Duffy Duck (@duffyduck)", | |
"Porky Pig (@porkypig)" | |
] | |
participants.size | |
WINNERS_SIZE = 2 | |
raise "Everybody wins! Congrats to \ | |
#{participants.join(", ")}" if | |
WINNERS_SIZE >= participants.size | |
winners = [] of String | |
WINNERS_SIZE.times do | |
winner = participants.sample | |
participants.delete winner | |
winners << winner | |
end | |
puts "Thank you all for participating and supporting @CrystalLanguage. | |
Today's #{WINNERS_SIZE} lucky winners are: \n\n#{winners.join("\n")}\n | |
Please reach us on Twitter so we can send you your stickers!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment