Skip to content

Instantly share code, notes, and snippets.

@fono09
Last active December 7, 2016 12:56
Show Gist options
  • Save fono09/8a7350f0ee9fa92944e2aa4a5e93bebb to your computer and use it in GitHub Desktop.
Save fono09/8a7350f0ee9fa92944e2aa4a5e93bebb to your computer and use it in GitHub Desktop.
オデン🍢
o_den = [['オ',0.25],['デン',0.5]]
o_den_queue = []
o_den_emoji = '🍢'
while true
case o_den_queue[-1]
when o_den[0] then
sleep o_den[0][1]
when o_den[1] then
sleep o_den[1][1]
end
o_den_queue.push(o_den.sample)
o_den_queue.shift if o_den_queue.length > o_den.length
print o_den_queue[-1][0]
print o_den_emoji + "\n" if o_den_queue == o_den
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment