資源簡介
俄羅斯方塊C語言源代碼,附有詳細中文解釋,適合C語言初學者,簡單易懂,對于提高C語言應用能力有很大幫助。
代碼片段和文件信息
#include?“graphics.h“?
#include?“time.h“?
#include?“stdlib.h“
#include?“bios.h“?
#include?“dos.h“
#include?“string.h“
#include?“stdio.h“
#include?
#define?MAX_X???????16
#define?MAX_Y???????21
#define?MAX_C???????7
#define?KEY_UP??????72
#define?KEY_DOWN????80
#define?KEY_LEFT????75
#define?KEY_RIGHT???77
#define?KEY_ESC?????27
#define?STARTX????280
#define?STARTY????0
#define?LEN???????18
typedef?int?BOOL;
#define?FALSE?0
#define?TRUE?1
int?score=0;
int?level=1;
typedef?struct?{
????BOOL?enabled;
????unsigned?int?intervel;
????unsigned?int?lasttime;
}?Timer;
int?GetTickCount();
int?setTimer(Timer?*t?unsigned?int?intv?BOOL?en);
BOOL?testTimer(Timer?*t);
void?render(void);
int?newFall();
void?rotateBox(int?box1[4][4]?int?box2[4][4]
- 上一篇:天龍八部多開源碼思路
- 下一篇:基于C++實現的語法分析程序代碼
評論
共有 條評論