?? disc.cpp
字號:
// Disc.cpp: implementation of the Disc class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "HanoiTower.h"
#include "Disc.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Disc::Disc()
{
}
Disc::~Disc()
{
}
CRect Disc::GetDisc()
{
return CRect(m_pointCenterBottom.x-m_sizeDisc.cx/2,
m_pointCenterBottom.y+m_sizeDisc.cy,
m_pointCenterBottom.x+m_sizeDisc.cx/2,
m_pointCenterBottom.y);
}
void Disc::SetCerterBottomPoint(Tower &T)
{
m_pointCenterBottom.x = T.m_pointCenter.x;
m_pointCenterBottom.y = T.m_sizeBase.cy + (T.m_nTotalDiscNum - 1)*m_sizeDisc.cy;
}
Disc& Disc::operator =(Disc &d)
{
m_DiscColor=d.m_DiscColor;
m_nDiscCurrentLayer=d.m_nDiscCurrentLayer;
m_nDiscCurrentTower=d.m_nDiscCurrentTower;
m_nDiscSerialNum=d.m_nDiscSerialNum;
m_pointCenterBottom=d.m_pointCenterBottom;
m_sizeDisc=d.m_sizeDisc;
return *this;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -