Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- # coding: utf-8
- l = 10
- s = " "
- b = "---"
- # header
- puts (1...l).inject(["A"]){|a,l| a<<a[-1].succ}.join(s)
- # body
- 12.times{
- puts (["|"]*l).zip((1...l).map{(rand*10).to_i.zero? ? b : s}).join
- }
- # footer
- puts ["!",*[" "]*(l-1)].shuffle.join(s)
Add Comment
Please, Sign In to add comment