📄 framedoc.cpp
字号:
// frameDoc.cpp : implementation of the CFrameDoc class//#include "stdafx.h"#include "fiver.h"#include "frameDoc.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CFrameDocIMPLEMENT_DYNCREATE(CFrameDoc, CDocument)BEGIN_MESSAGE_MAP(CFrameDoc, CDocument) //{{AFX_MSG_MAP(CFrameDoc) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CFrameDoc construction/destructionCFrameDoc::CFrameDoc(){ // TODO: add one-time construction code here}CFrameDoc::~CFrameDoc(){}BOOL CFrameDoc::OnNewDocument(){ if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE;}/////////////////////////////////////////////////////////////////////////////// CFrameDoc serializationvoid CFrameDoc::Serialize(CArchive& ar){ if (ar.IsStoring()) { int i = 0; int n = AI.step; ar<<n; for(i = 0;i< n;i++) { ar<<AI.ChessRecord[i].nx; ar<<AI.ChessRecord[i].ny; ar<<AI.ChessRecord[i].style; } } else { int n; unsigned char nx,ny; int style; AI.NewGame(); ar>>n; AI.RecordStep = n; for (int i = 0;i < n;i++) { ar>>nx; ar>>ny; ar>>style; AI.ChessRecord[i].nx = nx; AI.ChessRecord[i].ny = ny; AI.ChessRecord[i].style = style?1:0; } }}/////////////////////////////////////////////////////////////////////////////// CFrameDoc diagnostics#ifdef _DEBUGvoid CFrameDoc::AssertValid() const{ CDocument::AssertValid();}void CFrameDoc::Dump(CDumpContext& dc) const{ CDocument::Dump(dc);}#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////// CFrameDoc commandsCFiverAI* CFrameDoc::GetAI(){ return &AI;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -