資源簡介
這是c++最簡單的五子棋機器走法的算法代碼。
代碼片段和文件信息
#include?“stdafx.h“
#include?
#include?
//辦跑計
HINSTANCE?hInst;
HBITMAP chess[2];
HDC hdcmdcbufdc;
HWND hWnd;
DWORD tPretNow;
int board[10][10];
bool ptab[10][10][192];
bool ctab[10][10][192];
int win[2][192];
int num[2];
bool turnover;
int winner;
//ㄧΑ
ATOM MyRegisterClass(HINSTANCE?hInstance);
BOOL InitInstance(HINSTANCE?int);
LRESULT?CALLBACK WndProc(HWND?UINT?WPARAM?LPARAM);
void MyPaint(HDC?hdc);
void InitGame();
void ComTurn();
//****祘Α**************************************
int?APIENTRY?WinMain(HINSTANCE?hInstance
?????????????????????HINSTANCE?hPrevInstance
?????????????????????LPSTR?????lpCmdLine
?????????????????????int???????nCmdShow)
{
MSG?msg;
MyRegisterClass(hInstance);
//磅︽﹍てㄧΑ
- 上一篇:個人通信錄c++版完整代碼
- 下一篇:Linux下C++ 與python人臉檢測
評論
共有 條評論