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 >
C/C++ Source or Header  |  1995-04-14  |  3KB  |  76 lines

  1. /* The data file consists of one poker_game_typ followed by MAXNODES number
  2.    of poker_player_typs.  This is then followed by the in tables, which
  3.    consist of MAXNODES bytes (the "want in" table) followed by another
  4.    MAXNODES bytes (the "is in" table). */
  5.  
  6. #define POKHAND_HIGHCARD      0x0000
  7. #define POKHAND_ONEPAIR       0x1000
  8. #define POKHAND_TWOPAIR       0x2000
  9. #define POKHAND_THREEKIND     0x3000
  10. #define POKHAND_STRAIGHT      0x4000
  11. #define POKHAND_FLUSH         0x5000
  12. #define POKHAND_FULLHOUSE     0x6000
  13. #define POKHAND_FOURKIND      0x7000
  14. #define POKHAND_STRAIGHTFLUSH 0x8000
  15. #define POKHAND_ROYALFLUSH    0x800D
  16.  
  17. #define POKER_START           0
  18. #define POKER_BETIN           1
  19. #define POKER_DISCIN          2
  20. #define POKER_FOLDIN          3
  21. #define POKER_WANTIN          4
  22. #define POKER_WANTOUT         5
  23.  
  24. typedef struct
  25.     {
  26.     XINT          currentturn;
  27.     char          gametype;
  28.     unsigned long pot;
  29.     unsigned long highbet;
  30.     char          gameprogress;
  31.     time_t        eventstarttime;
  32.     char          cardsused[54];
  33.     XINT          winners[10];
  34.     unsigned XINT winscore;
  35.     unsigned long winrawscore;
  36.     unsigned char numwinners;
  37.     char          wincards[10];
  38.     char          acehigh;
  39.     XINT          roundprogress;
  40.     char          gameon;
  41.     char          reserved[128 - 111];
  42.     } poker_game_typ;
  43.  
  44. typedef struct
  45.     {
  46.     char          cards[10];
  47.     unsigned long thisbet;
  48.     char          discards[10];
  49.     unsigned long totalbet;
  50.     char          numnags;
  51.     char          reserved[128 - 29];
  52.     } poker_player_typ;
  53.  
  54. extern void poker_game(void);
  55. extern void poker_event(void);
  56. extern void poker_core(XINT task, XINT fromnode);
  57. extern XINT poker_lownode(XINT startnode, char *intable);
  58. extern XINT poker_count(char *intable);
  59. extern void poker_loadplyrdata(XINT nodenum, poker_player_typ *loaddata);
  60. extern void poker_saveplyrdata(XINT nodenum, poker_player_typ *savedata);
  61. extern void poker_loadgamedata(poker_game_typ *loaddata);
  62. extern void poker_savegamedata(poker_game_typ *savedata);
  63. extern void poker_loadintable(long start, char loadtype, char *dataptr);
  64. extern void poker_saveintable(long start, char savetype, char *dataptr);
  65. extern void poker_shuffle(char *cardz);
  66. extern void poker_advanceturn(XINT mini, char *whobuf,
  67.                               poker_game_typ *gamebuf);
  68. extern void poker_findwinners(char *wwho, poker_game_typ *wgame);
  69. extern unsigned XINT poker_scorehand(poker_player_typ *sdat);
  70. extern unsigned long poker_rawscorehand(poker_player_typ *sdat);
  71. extern void poker_sorthand(poker_player_typ *sdat);
  72. extern char XFAR *poker_gethandname(poker_player_typ *handdat);
  73. extern char XFAR *poker_getshortname(poker_player_typ *handdat);
  74.  
  75. extern unsigned char poker_nagtimes[6];
  76.