#!/bin/env ruby # Bunny - Print a large ASCII-pixel bunny icon made up of the letters # of the word BUNNY. # This is a recreation of bunny.bas in Ruby that takes advantage of # the language's features to make the code easier to understand and # modify. # # Instead of storing the image as a set of ranges, we just store it as # ASCII art, then replace the pixes with the appropriate letters when # printing. In addition to being simpler, this also lets you modify # the image much more easily. # We assume a screen width of 80. (With modern consoles, doing this # accurately gets complex and it's really not worth the bother for # this little program so 80 columns it is.) ScreenWidth = 80 # The bunny image. Totally not the logo of a magazine that was edgy # in the 1970s. Bunny = <