in reply to Golf: Movie style code cracker.
122, but the true "movie version" is longer
# 123456789_123456789_123456789_123456789_123456789_123456789_1 +23456789_123456789_123456789_123456789_123456789_123456789_12 perl5.10 -E'$l=pop;sub r(){int rand 10}@x=map r,1..$l;while(@h<@x){@g= +map$h[$_]//r,0..$l-1;push@h,$g[@h]if$g[@h]==$x[@h];say@g}' 16
Movie Version: clear line and slowdown (approx 3 min)
perl5.10 -E'$l=pop;sub r(){int rand 10}@x=map r,1..$l;$|=1;print@x;whi +le(@h<@x){@g=map$h[$_]//r,0..$l-1;push@h,$g[@h]if$g[@h]==$x[@h]&&"111 +1"==r.r.r.r;print"\b"x$l," "x$l,"\b"x$l,@g}say' 16
Update: make movie version spin wheels more to break 2.5min bonus point time.
Good Day,
Dean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Golf: Movie style code cracker.
by mr_mischief (Monsignor) on Sep 12, 2008 at 17:46 UTC | |
|
Re^2: Golf: Movie style code cracker.
by BrowserUk (Patriarch) on Sep 14, 2008 at 03:40 UTC |