Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Not really obfuscated, just hard to read because I was trying to shorten it enough so that Netscape would let me use it as a sig file. I wrote it with 5.6.0 outputting in a bash shell, and I'm quite sure it's not terribly portable. You'll have to trim out the red '+'s, and join those lines, I think, to get it to run right.
@a=0..63;g(o($_),a($_)?$_<24?"w":$_>39?"b":0:0)for@a;$w=$b=12;while($w +&&$b) {$z=!$z if!$r;$i=" 01234567\n";print$i,(join"",map{($x,$y)=o($_);($x?" +":$y) .(a($_)?`tput smso`:`tput rmso`).(g(o($_))||" ").`tput rmso`.($x==7?"$ +y\n": "")}@a),$i;$z?&n:&c;g($f,$g,($g==7&&$z)||!($z||$g)?uc&w:g($d,$e));g($d +,$e,0 );t(1)}sub n{print"$_[0]xyxy?\n";($d,$e,$f,$g)=split"",<STDIN>;&v||&n} +sub t{ @t=($f>$d?$d+1:$d-1,$g>$e?$e+1:$e-1);if($s==4&&g(@t)&&lc(g(@t))ne&w +){if( @_){g(@t,0);$z?--$b:--$w;&b}1}else{0}}sub v{$s=($d-$f)**2;(lc(g($d,$e) +)ne&w ||$s!=($e-$g)**2||g($f,$g)||$f>7||$f<0||$g>7||$g<0||(($z?$e-$g:$g-$e)> +0)&&! (g($d,$e)eq uc&w)||!($s==1||t())||($r?$d!=$c||$e!=$h:0))?0:1}sub c{for +(@a){ ($d,$e)=o($_);if(lc(g(o($_)))eq&w){for(@a){($f,$g)=o($_);&t?return:pus +h@q,[ $d,$e,$f,$g]if&v}}}($d,$e,$f,$g)=@{$q[$#q]}}sub w{$z?"w":"b"}sub o{($_[0]%8,int($_[0]/8))}sub a{($_[0]%8+int($_[0]/8))%2}sub g{$n=$_[0]+8*$_[1];defined$_[2]?$j[$n]=$_[2]:$j[$n]}sub b{$d=$c=$f;$e= +$h=$g ;$r=(grep{($f,$g)=o($_);&v&&t()}@a)?1:0}die$w?"win":"lose"."\n"
I was happy for it to come in under 1k (1 byte under)

In reply to I'm bored, let's play a game by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (6)
    As of 2018-02-22 00:00 GMT
    Find Nodes?
      Voting Booth?
      When it is dark outside I am happiest to see ...

      Results (288 votes). Check out past polls.