-
Notifications
You must be signed in to change notification settings - Fork 1
/
DefenderPlayEngine.H
89 lines (76 loc) · 2.26 KB
/
DefenderPlayEngine.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//----------------------------------------------------------------------------------------
//
// This file and all other Easy Bridge source files are copyright (C) 2002 by Steven Han.
// Use of this file is governed by the GNU General Public License.
// See the files COPYING and COPYRIGHT for details.
//
//----------------------------------------------------------------------------------------
//
// CDefenderPlayEngine
//
#ifndef __CDEFENDERPLAYENGINE__
#define __CDEFENDERPLAYENGINE__
#include "PlayEngine.h"
//
class CDefenderPlayEngine : public CPlayEngine {
friend class CPlayer;
//
// public routines
//
public:
// virtual functions
virtual void Initialize(CPlayer* pPlayer, CPlayer* pPartner, CPlayer* pLHOpponent, CPlayer* pRHOpponent, CHandHoldings* pHoldings, CCardLocation* pCardLocation, CGuessedHandHoldings** pGuessedHands, CBidEngine* pBidder, CPlayerStatusDialog* pStatusDlg);
virtual void InitNewHand();
virtual void Clear();
//
virtual CCard* PlayCard();
virtual CCard* PlayFirst();
virtual CCard* PlaySecond();
virtual CCard* PlayThird();
virtual CCard* PlayFourth();
//
virtual CCard* GetLeadCard();
virtual CCard* GetDiscard();
virtual CCard* GetPlayHint();
//
virtual int GetNumClaimableTricks();
//
virtual void RecordCardPlay(int nPos, CCard* pCard);
virtual void RecordCardUndo(int nPos, CCard* pCard);
virtual void RecordTrickUndo();
virtual void RecordRoundComplete(int nPos, CCard* pCard);
virtual void RestartPlay();
// class-specific functions
virtual int ReviewBiddingHistory();
virtual CCard* FindLeadCardFromPartnerPreference();
virtual CCard* Get4thBestLeadCard();
virtual CCard* GetHighDiscard(CSuitHoldings& suit);
virtual CCard* CashWinners();
//
// private routines
//
protected:
//
virtual void AssessPosition();
virtual BOOL IsPartnerVoidInSuit(int nSuit);
// public data
public:
// private data
private:
// class-specific data
int m_numRequiredTricks;
int m_nPartnerSuitPreference[4];
int m_nSignalledSuit;
int m_nSuitSignalStatus[4];
int m_nEchoedSuit;
BOOL m_bSuitEchoed[4];
BOOL m_bSuitLed[4];
BOOL m_bUsingGIB;
//
// private routines
//
private:
CDefenderPlayEngine();
virtual ~CDefenderPlayEngine();
};
#endif