datatype.h
来自「俄罗斯方块」· C头文件 代码 · 共 43 行
H
43 行
#ifndef H_DATATYPE
#define H_DATATYPE
#include <vector>
#include<bitset>
#include <list>
using namespace std;
typedef struct {
int x;
int y;
}Coord;
typedef struct {
int x;
int y;
int width;
int height;
}Rect;
enum Command
{
NONE,//无
LEFT,//向左
RIGHT,//向右
DOWN,//向下
ROTATE,//旋转
FALL,//直接落下
PAUSE,//暂停
QUIT,//退出
HELP,//帮助,显示操作菜单
INVALID
};
const int LINES = 20;
const int COLUMNS = 16;
typedef bitset<COLUMNS> LineCode;
typedef bitset<16> BoxCode;
typedef vector<LineCode> GridCode;
//typedef list<LineCode> GridCode;
typedef GridCode::iterator IterGrid;
typedef vector<int> VectInt;
typedef VectInt::iterator IterInt;
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?