home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
top2src.zip
/
GAMES.ZIP
/
OLDPOKER.ZIP
/
OLDPOKER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-14
|
3KB
|
76 lines
/* The data file consists of one poker_game_typ followed by MAXNODES number
of poker_player_typs. This is then followed by the in tables, which
consist of MAXNODES bytes (the "want in" table) followed by another
MAXNODES bytes (the "is in" table). */
#define POKHAND_HIGHCARD 0x0000
#define POKHAND_ONEPAIR 0x1000
#define POKHAND_TWOPAIR 0x2000
#define POKHAND_THREEKIND 0x3000
#define POKHAND_STRAIGHT 0x4000
#define POKHAND_FLUSH 0x5000
#define POKHAND_FULLHOUSE 0x6000
#define POKHAND_FOURKIND 0x7000
#define POKHAND_STRAIGHTFLUSH 0x8000
#define POKHAND_ROYALFLUSH 0x800D
#define POKER_START 0
#define POKER_BETIN 1
#define POKER_DISCIN 2
#define POKER_FOLDIN 3
#define POKER_WANTIN 4
#define POKER_WANTOUT 5
typedef struct
{
XINT currentturn;
char gametype;
unsigned long pot;
unsigned long highbet;
char gameprogress;
time_t eventstarttime;
char cardsused[54];
XINT winners[10];
unsigned XINT winscore;
unsigned long winrawscore;
unsigned char numwinners;
char wincards[10];
char acehigh;
XINT roundprogress;
char gameon;
char reserved[128 - 111];
} poker_game_typ;
typedef struct
{
char cards[10];
unsigned long thisbet;
char discards[10];
unsigned long totalbet;
char numnags;
char reserved[128 - 29];
} poker_player_typ;
extern void poker_game(void);
extern void poker_event(void);
extern void poker_core(XINT task, XINT fromnode);
extern XINT poker_lownode(XINT startnode, char *intable);
extern XINT poker_count(char *intable);
extern void poker_loadplyrdata(XINT nodenum, poker_player_typ *loaddata);
extern void poker_saveplyrdata(XINT nodenum, poker_player_typ *savedata);
extern void poker_loadgamedata(poker_game_typ *loaddata);
extern void poker_savegamedata(poker_game_typ *savedata);
extern void poker_loadintable(long start, char loadtype, char *dataptr);
extern void poker_saveintable(long start, char savetype, char *dataptr);
extern void poker_shuffle(char *cardz);
extern void poker_advanceturn(XINT mini, char *whobuf,
poker_game_typ *gamebuf);
extern void poker_findwinners(char *wwho, poker_game_typ *wgame);
extern unsigned XINT poker_scorehand(poker_player_typ *sdat);
extern unsigned long poker_rawscorehand(poker_player_typ *sdat);
extern void poker_sorthand(poker_player_typ *sdat);
extern char XFAR *poker_gethandname(poker_player_typ *handdat);
extern char XFAR *poker_getshortname(poker_player_typ *handdat);
extern unsigned char poker_nagtimes[6];