?? newgame.cpp
字號:
// NewGame.cpp : implementation file
//
#include "stdafx.h"
#include "Chess.h"
#include "NewGame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNewGame dialog
CNewGame::CNewGame(CWnd* pParent /*=NULL*/)
: CDialog(CNewGame::IDD, pParent)
{
//{{AFX_DATA_INIT(CNewGame)
//}}AFX_DATA_INIT
}
void CNewGame::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CNewGame)
DDX_Control(pDX, IDC_LISTENGINE, m_SearchEngineList);
DDX_Control(pDX, IDC_PLY, m_SetPly);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CNewGame, CDialog)
//{{AFX_MSG_MAP(CNewGame)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNewGame message handlers
void CNewGame::OnOK()
{
// TODO: Add extra validation here
//保存用戶選擇的搜索引擎號碼
m_nSelectedEngine=m_SearchEngineList.GetCurSel();
//保存用戶選擇的搜索深度
m_nSelectedPly=m_SetPly.GetPos();
CDialog::OnOK();
}
BOOL CNewGame::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
//在listbox中加入負極大值引擎字樣
m_SearchEngineList.AddString("NegamaxSearchEngine");
m_SearchEngineList.SetCurSel(0);//默認選擇第一個引擎
m_SetPly.SetRange(1,5);//設定搜索深度范圍
m_SetPly.SetPos(3);//默認的搜索深度為3
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -