shape.cpp

来自「用MFC做的简单的俄罗斯方块。功能都已经实现。但是没有考虑算法。希望大家指教。」· C++ 代码 · 共 76 行

CPP
76
字号
// Shape.cpp: implementation of the Shape class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "aa.h"
#include "Shape.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Shape::Shape()
{
	x=90;
	y=30;
}

Shape::~Shape()
{

}

void Shape::Drawbutton(int x, int y, CDC *pDC, CDC *pDisplayMemDC)
{
	
}


void Shape::Draw1(CDC *pDC, CDC *pDisplayMemDC)
{

}

void Shape::Draw2(CDC *pDC, CDC *pDisplayMemDC)
{

}

void Shape::Draw3(CDC *pDC, CDC *pDisplayMemDC)
{

}

void Shape::ChangeStatus(int Status)
{
 	status =Status%4;
}

void Shape::DrawShape(CDC *pDC, CDC *pDisplayMemDC)
{
	switch(status)
	{
		case 0:
		Draw(pDC, pDisplayMemDC);break;
		case 1:
		Draw1(pDC, pDisplayMemDC);break;
		case 2:
		Draw2(pDC, pDisplayMemDC);break;
		case 3:
		Draw3(pDC, pDisplayMemDC);break;
	}
}

void Shape::setposition(int x, int y)
{
	this->x=x;
	this->y=y;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?