⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jldoc.h

📁 很经典的用C++编的空当接龙的程序
💻 H
字号:
// JLDoc.h : interface of the CJLDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_JLDOC_H__B381F5EB_2644_11D8_9B84_00055D5E1EBB__INCLUDED_)
#define AFX_JLDOC_H__B381F5EB_2644_11D8_9B84_00055D5E1EBB__INCLUDED_

#include "DlgScore.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

VOID CALLBACK LineDDACallback(int x, int y, LPARAM lparam);

class CJLView;
class HINTS;

class CJLDoc : public CDocument
{
protected: // create from serialization only
	CJLDoc();
	DECLARE_DYNCREATE(CJLDoc)

// Attributes
public:
	UINT m_nSel;
	HINTS m_Hints;

	int m_nCurGameNumber;
	CObList *m_pOps;
	UINT m_iCards[8][20];//6+13=19
	UINT m_iBuffer[4];
	UINT m_iRecycle[4][14];

	BOOL m_bMaxMove;
	BOOL m_bQuickMove;
	BOOL m_bEnableDbClick;
	BOOL m_bEnableAlert;

	bool m_bAICalRunning;
	bool m_bRealTimeUpdate;
	// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CJLDoc)
	public:
	virtual void Serialize(CArchive& ar);
	virtual void DeleteContents();
	virtual BOOL CanCloseFrame(CFrameWnd* pFrame);
	//}}AFX_VIRTUAL

// Implementation
public:
	void BackHome() ;
	BOOL GiveUp();
	CRect RectOfStep();
	void Record(CObject * thisStep);
	void InvalidateRect(CRect r);
	UINT FindEmptyBuf();
	bool IsCard(UINT card);
	bool IsCol(UINT col);
	bool ColInRecycle(UINT col);
	bool ColInCard(UINT col);
	bool ColInBuf(UINT col);
	UINT BottCard(UINT col);
	UINT CntMaxSuppliment(bool OccupyAnEmptyCol = false);
	UINT Num(UINT card);
	UINT Type(UINT card);
	UINT CntCardsIn(UINT col);
	UINT CntSeriIn(UINT col);
	bool GameOver(void);
	void AutoThrow();
	UINT CntMaxMv(UINT desCol,UINT srcCol);
	void SelectCardCol(UINT col);
	bool IsEmptyCol(UINT col);
	void UnselectCardCol();
	void Shuffle();
	void MoveCards(UINT des,UINT src,UINT n);
	virtual ~CJLDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	//便于调试的时候知道程序执行到了哪里
#ifdef DEBUG_ALERT
	void ShowMessage(char* pMsg,int src,int des,int cnt);
#endif


protected:

// Generated message map functions
public:
	CDlgScore m_dlgScore;
	void Undo();
	CARD_POS * FindCardForLabel(UINT cardLabel,CARD_POS * pos);
	CRect RectOf(UINT card);
	int m_nDDASpeed;
	int Random(void);
	void StartGame(int gameNumber);
	char * FindActiveCard(UINT card,char * b,char *r);
	bool Trashable(UINT card);
	UINT* SortByActivity(UINT *pCols);
	void GetHints(void);
	bool DoAICal(void);
	void CheckGame();
	CJLView* GetView(void);
	bool CombimeCol(UINT col);
	bool SpliteCol(UINT col);
	void GetTarget(int col,int *target);
	UINT CntEmptyCardCols(void);
	UINT CntEmptyBufs(void);
	UINT FindEmptyCardCol(void);
	bool FitFormula(UINT b, UINT a);
	bool Splite();
	bool Combine();
	bool AICal();
	void ClrOpsRecords(void);
	UINT GetCard(UINT col,UINT idx);
	CRect RectOf(UINT col,UINT idx ,UINT nCards);
	//{{AFX_MSG(CJLDoc)
	afx_msg void OnUndo();
	afx_msg void OnSetting();
	afx_msg void OnSelectgamenumber();
	afx_msg void OnSave();
	afx_msg void OnLoad();
	afx_msg void OnAi();
	afx_msg void OnHelpNextstep();
	afx_msg void OnRand();
	afx_msg void OnPrevGame();
	afx_msg void OnNextGame();
	afx_msg void OnAgain();
	afx_msg void OnEdit();
	afx_msg void OnScore();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_JLDOC_H__B381F5EB_2644_11D8_9B84_00055D5E1EBB__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -