全行きっちり使い果たして
>>869から-5bytes
sub u{@b[$l,$k]=@_}sub v{$b[$v=$_[0]]}sub w{'.'eq&v}$y=$c=0;$l=12;$k=19;$o='#'x
10 ."\n";$m='.'x8;@b=split'',$o.("#$m#\n"x8).$o;while(@n=(-1,11,-11,1,1,-11)){u
"P","E";print@b,"YOU:$y\nCOM:$c\n";exit if$l==$k||$y+$c>61;u" "," ";$y++if'#'ne
v($l+$n[($m=<>%5||exit)-1])&&w$l=$v;w($k=int rand 4<3&&(w$k-1||w$k+1||w$k-11||w
$k+11)?$v:$k+(v($k+($d=$n[int rand 6]))eq'#'?-$d:$d))&&$c++if$l!=$k}