Last active
May 20, 2022 11:05
-
-
Save everm1nd/9971598 to your computer and use it in GitHub Desktop.
Print Emoji in Ruby
This file contains 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
# all emoji | |
# 1000.times { |i| emoji(127740 + i) + ' ' } | |
# moon phases | |
# 8.times { |i| emoji(127761 + i) } | |
DELAY = 0.3; | |
# clean screen | |
def clean | |
puts "\e[H\e[2J"; | |
end | |
def emoji(n) | |
print [n].pack('U*'); | |
end | |
clean() | |
64.times do | |
8.times do |i| | |
clean | |
emoji(127768 - i) | |
puts | |
sleep DELAY | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment