[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
Re: [FWP] APL vs. Perl. A query from a lazy programmer.
- To: Fun With Perl <fwp@technofile.org>
- Subject: Re: [FWP] APL vs. Perl. A query from a lazy programmer.
- From: "Keith Calvert Ivey" <kcivey@cpcug.org>
- Date: Sat, 17 Feb 2001 09:05:14 -0500
- Comments: Authenticated sender is <kcivey@cpcug.org>
- Delivered-To: irons-bumppo:net-mpfwp@bumppo.net
- In-reply-to: <3A8E10E1.7F5C1A7F@home.com>
Rick Delaney <rick.delaney@home.com> wrote:
> Here's 198. I'm sure it can be shortened/improved, but it's time for
> bed.
>
> @s=qw/S H D C/;for$s(@s){$_='AKQJT98765432';for$i(4,3,2,1){my$c;s/./
> rand$i>1?$&:($c.=$&,"")/ge;($j,$f)=$i%2?($i,"%15s:%s"):(2,"%s:%-25s");
> $x[$j]{$s}.=sprintf$f,$s,$c}}$,=$\="\n";print@{$_}{@s}for@x;
Unfortunately the method of distributing cards is flawed.
Randomly assigning each card to a player independently doesn't
ensure that each player ends up with 13 cards.
--
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