Search the web
Sign In
New User? Sign Up
dvorak-list · Dvorak - The Nomic Card Game System
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Card dealing program?   Message List  
Reply | Forward Message #898 of 900 |
Re: [dvorak-list] Card dealing program?

On Wed, Nov 21, 2007 at 10:23:22PM -0500, nevthederanged@... wrote:
> If a program like this exists, surely someone here knows of it: I'm looking
> for a program or web app where I can enter values for cards in a deck and have
> them dealt randomly one at a time, while keeping track of the deck contents.

I wrote a program a couple of years back to simulate card draws for a
CCG I was playing. The perl to draw a card from the deck was:-

sub get_next_card {
my $deck=shift;
return splice(@$deck,rand(@$deck),1)
}

$deck is an (possibly ordered) array of cards.

TTFN
--
Roger. Home| http://www.sandman.uklinux.net/
Master of Peng Shui. (Ancient oriental art of Penguin Arranging)
Work|Independent Sys Consultant | http://www.computer-surgery.co.uk/
New key Fpr: 72AF 0ACC 9A53 E59F B1B6 DC14 1983 A13E 5C3D 3CEB


Thu Nov 22, 2007 10:32 am

rgammans@...
Send Email Send Email

Attachment
signature.asc
Type:
application/pgp-signature
Forward
Message #898 of 900 |
Expand Messages Author Sort by Date

If a program like this exists, surely someone here knows of it: I'm looking for a program or web app where I can enter values for cards in a deck and have them...
nevthederanged@...
nev_the_dera...
Offline Send Email
Nov 22, 2007
3:23 am

... I wrote a program a couple of years back to simulate card draws for a CCG I was playing. The perl to draw a card from the deck was:- sub get_next_card { ...
Roger Gammans
rgammans@...
Send Email
Dec 2, 2007
10:09 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help