?? 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 + -