📄 ticktacktoeview.h
字号:
// ticktacktoeView.h : interface of the CTicktacktoeView class
//
/////////////////////////////////////////////////////////////////////////////
#include <vector>
using namespace std;
#if !defined(AFX_TICKTACKTOEVIEW_H__2B3E3234_E5E4_47E2_BCF4_2CB9322D0677__INCLUDED_)
#define AFX_TICKTACKTOEVIEW_H__2B3E3234_E5E4_47E2_BCF4_2CB9322D0677__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CTicktacktoeView : public CView
{
protected: // create from serialization only
CTicktacktoeView();
DECLARE_DYNCREATE(CTicktacktoeView)
// Attributes
public:
CTicktacktoeDoc* GetDocument();
CBitmap bmpMax;
CBitmap bmpMin;
bool htoc;
bool finished;
int side;
int step;
int timeLimits;
bool manTurn;
bool computerFirst;
vector< vector<int> > chessman;
vector< vector<int> > manual;
int myDepth;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTicktacktoeView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CTicktacktoeView();
void OnStart();
int Result();
int ValueFuction(vector< vector<int> > QP);
int OneLineCounter(vector< vector<int> > QP,int flag);
int Max(vector< vector<int> > QP,int depth);
int Min(vector< vector<int> > QP,int depth);
void ComputerDown();
vector< vector< vector<int> > > NextQP(vector< vector<int> > QP, int ia);
vector<int> FindPosition(vector< vector<int> > vec1,vector< vector<int> > vec2);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CTicktacktoeView)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in ticktacktoeView.cpp
inline CTicktacktoeDoc* CTicktacktoeView::GetDocument()
{ return (CTicktacktoeDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TICKTACKTOEVIEW_H__2B3E3234_E5E4_47E2_BCF4_2CB9322D0677__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -