TCards

Did you know the CARDS.DLL file does not contain a
Joker, well the CARDS.DLL I have supplied does.  
This VCL is supplied FREE of charge, but I would like
to see any games you write using his component.

Allows the user to easily display the cards supplied 
in the CARDS.DLL file, and build games.

Written by Darren Clements (pitbull@iap.net.au)

PROPERTIES

CardBack:     This is the style of the design used to draw the
              card when CardStyle is set to cdBack.  Possible
              values range from 1 - 12.

CardStyle:    This depicts how the card will be drawn.  Possible
              values are:
              csBack:   Draw card back design
              csFront:  Draw card front
	      csJoker:  Draw a Joker (Supplied CARDS.DLL only)
              csO:      Draw placeholder card
              csX:      Draw invalid placeholder card

Selected:     When selected is true, card is drawn inversed, else
              card is drawn normal.

Suit:         Depicts what suit the given card is.  Possible
              values are:
              0:  Clubs
              1:  Diamonds
              2:  Hearts
              3:  Spades

Value:        Depicts the value of the card using the formula:
              Value:=FaceValue + (Suit * 13);
              Conversely:
              FaceValue:=Value - (Suit * 13);



Installing TCards

To install this VCL, copy both CARDS.DCU and CARDS.DCR to the
directory where you have your other shareware controls.  Then, 
from Delphi's main menu, select Options|Install Components.  In the
dialog, click on the Add... button, then Browse... and change to the 
drive/directory where you stored the above two files.  Select 
CARDS.DCU and click OK, then OK again.

Using TCARDS

To use this control, simply place it on your form, and edit the 
CardBack, CardStyle, Suit, and Value properties.

Sample Procedures:

procedure initdeck;
var
    i:integer;
begin
    {Initializes deck array, do once per program, or to reset}
    {deck[1..52] is a global array}
    for i:= 1 to 52 do
        deck[i]:=i;
end;


procedure shuffledeck;
var
    i,j,k,temp:integer;
begin
    {deck[1..52] is a global array}
    Randomize;
    For i := 1 To 10 do
        For j := 1 To 52 do
        begin
            k := trunc(1 + (52 * Random));
            temp := deck[j];
            deck[j] := deck[k];
            deck[k] := temp;
        end;
end;


