[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [DL] Card Dealer
Derek,
I once wrote a BlackJack program in VB. To solve the same issue, I did
this: The deck was a linked list that could be 'shuffled' by randomizing
the pointers. Then, once the deck was shuffled X times, the deck was pushed
onto a Stack (First In, Last Out). The First Card drawn was Popped of the
top of the Stack The Deck), then Pushed onto another Stack (The Discard
Pile). This way, you simulate drawing from the top of the deck. It's not
very efficient for memory, but the effect was what was important.
What you probably are doing is randomly picking a card from a list of 54
numbers, where a repeat can occur, unless you track the previously drawn
numbers. The problem with this is you don't accurately simulate the
function of the deck, and mess up any probabilities of getting a particular
card at certain time.
Hope this helps.
--Joel
-----Original Message-----
From: owner-deadlands@gamerz.net [mailto:owner-deadlands@gamerz.net]On
Behalf Of Derek D. Bass
Sent: Saturday, March 31, 2001 9:33 PM
To: deadlands@gamerz.net
Subject: RE: [DL] Card Dealer
If you already have the random card generator (which seems to me to be the
difficult bit, but then, I'm a database analyst, not a true programmer),
then halting repetition seems to be a matter of putting the pulled card(s)
into a set or table (see, database thinking) in which any following cards
have to be "Null" to be valid pulls. They could be reset with a "shuffle"
button, but I'm sure you already have that.
Dammit, I hope my meaning is getting through. I'm just not a programmer, but
I could design it in Access, easy as anything.
I hope that helps, or that someone else can help more.
Derek Bass
------Original Message------
From: "Nick Zachariasen" <zacharin@pluto.dsu.edu>
To: "Deadlands" <deadlands@gamerz.net>
Sent: April 1, 2001 2:01:07 AM GMT
Subject: [DL] Card Dealer
Well, I've made a card dealer program in VB, but I can't figure out how to
keep the program from drawing the same card twice. If anybody would be
willing to take a look at the source code and offer any suggestions, I'd
appreciate it. I figured on submitting it to PEG as a utility mainly for
Marshals who have to do draws for Mysterious Pasts and VotWW, as well as
players of Hucksters so they can cast hexes repeatedly without the group
having to wait for the player (or someone else) to reshuffle the deck. I
tried looking at the source for the DLCG, but I just can't figure out how
James cook did it.
Nick Zachariasen
Editor Emeritus
Trojan Times
_______________
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
To unsubscribe, send a message to esquire@gamerz.net with
unsubscribe deadlands
as the BODY of the message. The SUBJECT is ignored.