block.h
来自「俄罗斯方块 采用MFC和GDI+编写的,自己感觉写得不是很好,不过看上去还行」· C头文件 代码 · 共 43 行
H
43 行
#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 + =
减小字号Ctrl + -
显示快捷键?