📄 block.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 + -