#ifndef _HAND
#define _HAND

#include <windows.h>
#include <string.h>
#include "card.h"

#define TWO_CARD		0
#define FIVE_CARD 	1
#define SEVEN_CARD	2

#define DEALER 0
#define PLAYER 1

#define PLAYER_RIGHTBOX	1
#define PLAYER_LEFTBOX	80
#define PLAYER_TOPBOX		195
#define PLAYER_BOTTOMBOX	305

#define PLAYER_TWOHANDTOP 200
#define PLAYER_FIVEHANDTOP 200
#define PLAYER_DESC PLAYER_BOTTOMBOX + 10

#define DEALER_RIGHTBOX	1
#define DEALER_LEFTBOX	(DEALER_RIGHTBOX + 79)
#define DEALER_TOPBOX		45
#define DEALER_BOTTOMBOX	(DEALER_TOPBOX + 100)

#define DEALER_TWOHANDTOP 45
#define DEALER_FIVEHANDTOP 45
#define DEALER_DESC DEALER_BOTTOMBOX + 10

class Hand
{
   public:
      Card  card[7];
      int   type;          //is this a 2, 5 or 7 card hand
      int   hand_type;     //high card, pair, two pair, etc...
      int   who;           //PLAYER or DEALER
      int   first_pair;    //value of first_pair
      int   high_card;     //value of high card
      int   second_pair;
      int   three_of_what;
      int   four_of_what;
      int   five_of_what;
      int   baby;				// for baby straights and straight flushes

      PASCAL Hand(int, int);
      void PASCAL Describe(HDC, short, short);
      void PASCAL Parse(void);
      int  PASCAL operator>(Hand &);
      int PASCAL operator < (Hand &);
      void PASCAL SwapCards(Card *, Card *);
      void PASCAL Sort(void);
      int PASCAL Check(Hand *);
      void PASCAL Show(HDC, short, short, int);
};

extern HANDLE hInst;
extern HBITMAP hBitmap;

#endif

