29 lines
No EOL
452 B
C
29 lines
No EOL
452 B
C
#ifndef _BLOCK_H_
|
|
#define _BLOCK_H_
|
|
#include <stdlib.h>
|
|
# include <string.h>
|
|
#define MAX_X 8
|
|
#define MAX_Y 12
|
|
|
|
enum BLK_TP {none,two_h,two_v,three_l,three_r,three_h,three_v,four};
|
|
//点 结构体
|
|
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 genPiece();
|
|
void blockInit();
|
|
void dropPiece();
|
|
void drawBlock();
|
|
#endif |