Skip to content

Instantly share code, notes, and snippets.

@kowsik
Created January 24, 2011 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kowsik/792862 to your computer and use it in GitHub Desktop.
Save kowsik/792862 to your computer and use it in GitHub Desktop.
pong
loop do
76.times do |i|
print " " * i
print "o"
print "\r"
$stdout.flush
sleep 0.05
end
76.times do |i|
print " " * 77
print "\r"
print " " * (76 - i)
print "o"
print "\r"
$stdout.flush
sleep 0.05
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment