refactor(MCU课设): 简化代码结构

This commit is contained in:
iridiumR 2022-06-06 17:33:02 +08:00
parent 926ec204cc
commit 2238d190c6
2 changed files with 2 additions and 16 deletions

View file

@ -7,6 +7,7 @@ char base[MAX_X][MAX_Y] = {0}; //x*y //0Ϊ
extern unsigned char score; extern unsigned char score;
extern enum OPR opr; extern enum OPR opr;
void blockInit() void blockInit()
{ {

View file

@ -8,22 +8,7 @@
#define MAX_X 8 #define MAX_X 8
#define MAX_Y 12 #define MAX_Y 12
enum BLK_TP {none,two_h,two_v,three_l,three_r,three_h,three_v,four}; enum GS {start,good,over};
//点 结构体
struct _dot
{
unsigned char x;
unsigned char y;
} ;
typedef struct _dot Dot;
//块 结构体
struct _group
{
enum BLK_TP type; //类型
Dot mother;
};
typedef struct _group Group;
void blockInit(); void blockInit();
void blockDestroy(); void blockDestroy();