[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] APL vs. Perl. A query from a lazy programmer.



Okay, I've got it down to 201:

    @d=13..64;for(0,5,5,10){@h=sort+map{splice@d,rand@d
    ,1}b..n;for$s(0..3){$t=(S,H,D,C)[$s].': ';$s-$_%4
    ||($t.=(2..9,T,J,Q,K,A)[16-$_/4])for@h;$t[$_+$s].=
    ($_%2?'':$"x12).sprintf'%-23s',$t}}$\=$,=$/;print@t

Some of my earlier attempts had a bug ("a..n" in place of 
"b..n") that gave 14 cards to North, East, and West and only 
10 to South.

That's probably enough of my time spent on this thing. 
Besides, every time I check my e-mail I'm afraid Abigail will
have posted a 100-stroke solution.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe