home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
WTJ9403.ZIP
/
POKER
/
POKERDOC.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-31
|
3KB
|
81 lines
// pokerdoc.h : interface of the CPokerDoc class
//
/////////////////////////////////////////////////////////////////////////////
class CPokerDoc : public CDocument
{
protected: // create from serialization only
CPokerDoc();
DECLARE_DYNCREATE(CPokerDoc)
// Attributes
public:
// Operations
public:
// Variables
int nCurrentBack; // Which card back the user is seeing.
int nBackAnimate; // State of back animation. 0 is normal back.
int nAnimateCard; // Which (of dealer's) card is being animated.
int nAnimationCounter; // Controls the animation of the dealer's card backs.
int bFace[NUMBER_PLAYERS]; // Force display of face of card.
int nHand[NUMBER_PLAYERS][5]; // Each (of four) player's hand.
int nCurrentCard; // Which card (or back) is being displayed.
int nDeck[52]; // The current deck of cards.
int nTimer; // Animate card back timer ID.
int nHeight; // Height of a card.
int nWidth; // Width of a card.
int nPot; // The current pot.
int nOwed[NUMBER_PLAYERS]; // Amount each player owes to the pot
int nChips[NUMBER_PLAYERS]; // Each player's current holdings (in $5 chips)
int nPlaying[NUMBER_PLAYERS]; // TRUE if this player is currently playing...
CPoint CardLocation[NUMBER_PLAYERS][5]; // Location of each player's card
int nCardState[NUMBER_PLAYERS][5]; // State of each card (OK, Selected for discard...)
int nCurrentPlayer; // Who's turn it is...
int nOldCurrentPlayer; // Who was first to go, last round...
int nPlayerAction[NUMBER_PLAYERS]; // What the player did, last round.
int nPlayerBet[NUMBER_PLAYERS]; // The amount this player will be betting.
int nGameState; // Where in this hand we are in (deal, bet, draw, bet, showdown)
int bCanCall; // We can call the bet. TRUE if a player has bet or raised
int bCanBet; // We are the first player, or after prev players checked.
int bCanFold; // Always, except if we've folded already.
int bCanRaise; // Another player raised or bet. Can't raise our own bet.
int bCanCheck; // Only if previous players (if any) have checked.
// Implementation
public:
virtual ~CPokerDoc();
virtual void Serialize(CArchive& ar); // overridden for document i/o
void NewGame();
int Deal();
int DealDraw(int nPlayer);
int EvaluateFirst(int nPlayer);
void Bet(int nPlayer, int nChips);
void Call(int nPlayer);
void Fold(int nPlayer);
void Raise(int nPlayer, int nChips);
void Check(int nPlayer);
void NextPlayer();
void UpdateGameState();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
virtual BOOL OnNewDocument();
// Generated message map functions
protected:
//{{AFX_MSG(CPokerDoc)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////