⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 block.h

📁 俄罗斯方块 采用MFC和GDI+编写的,自己感觉写得不是很好,不过看上去还行
💻 H
字号:
#pragma once
#include "afx.h"
#include "Square.h"
#include "GameField.h"

using namespace Gdiplus;

class Block 
{
public:
	Block(void);
	Block(Point location,BlockTypes newBlockType,GameField & engine);
	bool Down();
	bool Right();
	bool Left();
	void Rotate();
	void Show();
	void Hide();
	int Top();
	BlockTypes GetType();
public:
	Block(Block const& block);
protected:
	GameField* _engine;

	Square *square1;
	Square *square2;
	Square *square3;
	Square *square4;
	//----------------------------------
	BlockTypes BlockType;
	
	RotationDirecttions StatusRotation;// = NORTH
	int squareSize; // = GameField.SquareSize

public:
	 static Color backColors[8];// = {Color(),Color::Red,Color::Blue,Color::Red,
		//Color::Yellow,Color::Green,Color::White,Color::Black};
	 static Color foreColor[8];// = {Color(),Color::Purple,Color::LightBlue,
		//Color::Yellow,Color::Red,Color::LightGreen,Color::Black,Color::White};
	~Block(void);
};

⌨️ 快捷键说明

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