List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:December 7 2000 9:12pm
Subject:Re: Need help (sigh, yes again)
View as plain text  
>>>>> "EF" == Eric Fitzgerald <eric@stripped> writes:


EF> We are currently running a special prize give away promotion for
EF> our website.  Every visitor that comes to the site is given an

I certainly hope you have the necessary legal paperwork done for your
giveaway...

EF> "Instant Win Card", or whatever the marketing guys wanted to call
EF> it.  The card that they are assigned is random, and each card
EF> number has been pre selected on if it won a prize or not
EF> (something similiar to how scratch and win lottery is).

Wow... you're certainly shuffling a deck the hard way.

What you're doing is akin to having a deck of cards in some order.
Then when you need to give one out, you scan the contents of each card
to see if it has a mark in it that says "used".  Then you pick one of
those cards by its position and mark it "used" and give a copy to the
person.  Not very efficient.

Wouldn't it be much easier if you shuffled the deck at the start and
just handed them out in the shuffled order?  Then your hard work is
done all at once before the game starts, and to hand out a card you
just pick up the next one on the stack.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/
Thread
Need help (sigh, yes again)Eric Fitzgerald7 Dec
  • Re: Need help (sigh, yes again)Vivek Khera7 Dec
  • Re: Need help (sigh, yes again)Eric Fitzgerald7 Dec