資源簡介
使用C++編寫的五子棋程序,算法用的是alpha-beta剪枝,用MFC的框架

代碼片段和文件信息
//?fir.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“fir.h“
#include?“MainFrm.h“
#include?“firDoc.h“
#include?“firView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CFirApp
BEGIN_MESSAGE_MAP(CFirApp?CWinApp)
//{{AFX_MSG_MAP(CFirApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CFirApp?construction
CFirApp::CFirApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CFirApp?object
CFirApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CFirApp?initialization
BOOL?CFirApp::InitInstance()
{
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings(1);??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CFirDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CFirView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CAboutDlg?dialog?used?for?App?About
class?CAboutDlg?:?public?CDialog
{
public:
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????26316??2009-10-28?22:31??fir-v0.8\fir.aps
?????文件???????1904??2009-11-05?14:32??fir-v0.8\fir.clw
?????文件???????4030??2009-10-15?23:36??fir-v0.8\fir.cpp
?????文件???????4399??2009-10-27?20:57??fir-v0.8\fir.dsp
?????文件????????531??2009-10-15?23:16??fir-v0.8\fir.dsw
?????文件???????1323??2009-10-15?23:16??fir-v0.8\fir.h
?????文件?????189440??2009-11-05?14:32??fir-v0.8\fir.ncb
?????文件??????56832??2009-11-05?14:32??fir-v0.8\fir.opt
?????文件???????1172??2009-11-05?10:10??fir-v0.8\fir.plg
?????文件??????10156??2009-10-28?22:04??fir-v0.8\fir.rc
?????文件???????1682??2009-10-15?23:16??fir-v0.8\firDoc.cpp
?????文件???????1442??2009-10-15?23:16??fir-v0.8\firDoc.h
?????文件??????18924??2009-11-05?10:10??fir-v0.8\firView.cpp
?????文件???????2367??2009-10-28?21:57??fir-v0.8\firView.h
?????文件???????1646??2009-10-28?22:35??fir-v0.8\MainFrm.cpp
?????文件???????1421??2009-10-15?23:16??fir-v0.8\MainFrm.h
?????文件???????3927??2009-10-15?23:16??fir-v0.8\ReadMe.txt
?????文件???????1078??2009-10-16?17:10??fir-v0.8\res\fir.ico
?????文件????????395??2009-10-15?23:16??fir-v0.8\res\fir.rc2
?????文件???????1078??2009-10-15?23:16??fir-v0.8\res\firDoc.ico
?????文件????????868??2009-10-20?08:22??fir-v0.8\resource.h
?????文件????????205??2009-10-15?23:16??fir-v0.8\StdAfx.cpp
?????文件????????999??2009-10-15?23:16??fir-v0.8\StdAfx.h
?????目錄??????????0??2009-10-28?22:18??fir-v0.8\res
?????目錄??????????0??2009-11-05?14:32??fir-v0.8
-----------?---------??----------?-----??----
???????????????332135????????????????????25
評論
共有 條評論