Re: LZ: Random Number making


Re: LZ: Random Number making

On Mon, 23 Dec 1996 21:40:58 -0700 writes:
>number obtained.  Also, how would be the best way to represent cards?  
>think a 16 bit number would work best:
>Suit:     Value :       Card:        Value:
>Clubs       00            2             00
>Diamonds    01            3             01
>Hearts      02           ...            ...
>Spades      03          Jack            09   And so on.
>Combining these, I'd get:
>4 of Clubs is $0002
>Jack of Hearts is $0209

Actually, you could just use the first four bits of a byte for the suit
and the last for the card number.  I think something like this was used
for ZCasino.  It's source is available at ticalc, it has a random card
routine, and a card drawing routine, and all that neat stuff.

Jim Reardon
Viva la mexico
Point your browser on over to