Christmas Decorations FIXED by yvl

#!ruby -n
a=%w[ang sn tr car can ted bea]
b=[""]*4
gsub(/(^|.*?(\d+)?( more)? )(#{a*"|"}).*?(\W|$)/i){i=a.index($4.downcase)*4
b.map!{|x|x+[*"
 o  
/:\\ 
\\:/ 
 ^  
 __  
(oo) 
(~~) 
/__\\ 
  /\\   
 /,,\\  
/,,,,\\ 
  ||   
       
  __   
_/_L\\_ 
o----o 
 ))  
((.) 
 ||  
 ||  
"+"  _   
 o.o  
=(.)= 
 ! !  
"*2][i+=1].chop*($2||1).to_i}if$4}
puts b,""

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page