1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/sample/trick2015/monae/entry.rb
mame 5c28308f9f * sample/trick2015/: added the award-winning entries of TRICK 2015.
See https://github.com/tric/trick2015 for the contest outline.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11 14:37:06 +00:00

26 lines
893 B
Ruby

;; ;; ;; ;;
;; ;; ;; ;;
;;eval$s =%q[i=1#
eval(%q[ xxxxxxxx
xx xxxx xx xx xxxx xx
xx xxxx xx xx xxxx xx
xxxxxxxx xxxxxxxx
xxxxxxxx xxxxxxxx
xx xx xxxxxxxxxx xx xxxxxxxx
j, t, p=0,[?;]," ev al$s=%qx
[#$s]".split*"";i,j,t=i-j,i+j,(x
[b=?\s]*j.abs+t).map{|s|r=t.shix
ft ||b;r.gsub!(?;){p.slice!0}if $x
f| |=p>p=p.center(i*i+j*j,?;);r ,x
s=[s,r]if(i*j<0);(b*i.abs+s).ljx
ust(r.size).gsub(b){r[$`.size]|x
|b}}unti l$ f;puts(t)# xx xx
xxxxxxxx xx xxxxxxxxxx xx xx
xxxxxxxx xxxxxxxx
xxxxxxxx xxxxxxxx
xx xxxx xx xx xxxx xx
xx xxxx xx xx xxxx xx
xxxxxxxx x].gsub\
/x.*|\s/ ,"")#];;
;; ;; ;; ;;
;; ;; ;; ;;