Guest User

Untitled

a guest
Oct 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. # coding: utf-8
  3.  
  4. l = 10
  5. s = " "
  6. b = "---"
  7.  
  8. # header
  9. puts (1...l).inject(["A"]){|a,l| a<<a[-1].succ}.join(s)
  10.  
  11. # body
  12. 12.times{
  13. puts (["|"]*l).zip((1...l).map{(rand*10).to_i.zero? ? b : s}).join
  14. }
  15.  
  16. # footer
  17. puts ["!",*[" "]*(l-1)].shuffle.join(s)
Add Comment
Please, Sign In to add comment