-
Notifications
You must be signed in to change notification settings - Fork 0
/
YaMaXunDlg.h
143 lines (130 loc) · 3.1 KB
/
YaMaXunDlg.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// YaMaXunDlg.h : header file
//
#include <string>
#include <iostream>
using namespace std;
#if !defined(AFX_YAMAXUNDLG_H__B3AAFD53_67E8_472A_B064_AA439833187C__INCLUDED_)
#define AFX_YAMAXUNDLG_H__B3AAFD53_67E8_472A_B064_AA439833187C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CYaMaXunDlg dialog
struct Hebe
{
int chess_x;
int chess_y;
int bar_x;
int bar_y;
int x;
int y;
int score;
int timecount;
int node;
};
struct Move
{
int x;
int y;
int lx;
int ly;
int barx;
int bary;
};
/*
struct NodeOfMove
{
Move result;
NodeOfMove *Next;
};
struct NodeOfData
{
int Data[10][10];
int Dcount;
NodeOfMove *Move;
NodeOfData *Next;
};
struct NodeOfBar
{
int count;
NodeOfData *Data;
NodeOfBar *Next;
};
*/
struct NodeOfSave
{
int count;
int Dcount;
int Mcount;
int Data[10][10];
Move result;
NodeOfSave *Next;
// int count;
//int Dcount;
// int Mcount;
// int Data[10][10];
// Move result;
// SaveNode *Next;
};
class CYaMaXunDlg : public CDialog
{
// Construction
public:
string transpos(string s);
CYaMaXunDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CYaMaXunDlg)
enum { IDD = IDD_YAMAXUN_DIALOG };
CListBox m_action;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CYaMaXunDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
void Show(CPaintDC * dc);
int Broad[10][10];//0-Nothing,1-have a bar,2-have a chessman of zheng,3-have achessman of fan
void Play(CPoint p);
int Judge(int x,int y);
int Putbar(int x,int y);
int Move(int x,int y);
int Get(int x,int y);
NodeOfSave * MyInit();
int Is_Over();
int lx,ly;
int Is_Move;
int times;
int mode;
static UINT MyThreadProc(LPVOID pParam);
int Fan[4][2];
int Zheng[4][2];
Hebe Computer1();
Hebe Computer();
// Hebe GetTemp1(int x,int y);
// Hebe GetTemp(int x,int y);
// Hebe GetBar1(int x1,int y1,int x,int y);
// Hebe GetBar(int x1,int y1,int x,int y);
// int GetScore1(int x2,int y2,int x1,int y1,int x,int y);
// int GetScore(int x2,int y2,int x1,int y1,int x,int y);
int Is_OK(int x1,int y1,int x2,int y2,int tep[10][10] );
// int*getnewscore(int x,int y,int temp[][10],int *score);
// Generated message map functions
//{{AFX_MSG(CYaMaXunDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRestart();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnButton1();
afx_msg void OnButtonAcc();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_YAMAXUNDLG_H__B3AAFD53_67E8_472A_B064_AA439833187C__INCLUDED_)