home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 9
/
CD_ASCQ_09_1193.iso
/
maj
/
4437
/
int
/
spx_crd.int
< prev
next >
Wrap
Text File
|
1993-09-15
|
1KB
|
52 lines
Unit spx_crd;
{$X+,O+ }
{ SPX Library Version 2.0 Copyright 1993 Scott D. Ramsay }
Interface
const
{ card value type }
crd_jack = 11;
crd_queen = 12;
crd_king = 13;
crd_ace = 14;
{ card suite type }
crd_diamond = 0;
crd_heart = 1;
crd_spade = 2;
crd_club = 3;
{ five card poker values }
crd_nothing = 0;
crd_onepair = 1;
crd_twopair = 2;
crd_threekind = 3;
crd_fourkind = 4;
crd_fullhouse = 5;
crd_straight = 6;
crd_flush = 7;
crd_straightf = 8;
crd_rstraightf = 9;
type
BlackJackType = (BJnothing,BJhit,BJstay,BJsplit,BJdouble);
Tcard = record
card,suite : byte;
end;
Tdeck = array[0..51] of Tcard;
var
hicard : Tcard;
procedure SwapCard(var card1,card2:Tcard);
procedure CreateDeck(var adeck);
procedure ShuffleDeck(var adeck);
procedure SortDeck(var adeck;Lo,Hi:integer);
function PokerHand(var ahand):integer;
function SuiteString(suite:byte):string;
function PokerHandString(ehandvalue:integer):string;
function BJ_Total(var ahand;cards:integer):integer;
function BJ_Dealer(var ahand;cards:integer):BlackJackType;
Implementation