📄 diamond.h
字号:
//diamond.h
//diamond类 定义方块属性,提供方块移动旋转方法
#if !defined(AFX_DIAMOND_H__219E75CD_7B40_42AD_AB62_42145941CFB2__INCLUDED_)
#define AFX_DIAMOND_H__219E75CD_7B40_42AD_AB62_42145941CFB2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define I_COLOR 0xC0C0FF //长条色
#define T_COLOR 0X80C0FF //丁字色
#define O_COLOR 0XFFFF00 //方块色
#define LL_COLOR 0XFFC0FF //左条色
#define RL_COLOR 0XFFC0FF //右条色
#define LZ_COLOR 0X80FF80 //正2色
#define RZ_COLOR 0X80FF80 //反2色
#define FREEZE_COLOR 0X00FFFF
#define I_STYLE 0
#define T_STYLE 1
#define O_STYLE 2
#define LL_STYLE 3
#define RL_STYLE 4
#define LZ_STYLE 5
#define RZ_STYLE 6
struct subdiamond
{
int x;
int y;
};
class diamond
{
public:
diamond();
virtual ~diamond();
diamond & operator=(const diamond &);
void selectdiamond();
void rotatediamond();
void moveleftdiamond();
void moverightdiamond();
void movedowndiamond();
int diamondinfo(int index,int &x,int &y) const;
int diamondcolor() const{return m_color;};
int diamondmax() const{return m_maxsubdiamond;};
int subdiamondval() const{return m_subdiamondval;};
private:
int m_color;
int m_maxsubdiamond;
int m_subdiamondval;
subdiamond *m_diamond;
};
#endif // !defined(AFX_DIAMOND_H__219E75CD_7B40_42AD_AB62_42145941CFB2__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -