-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.h
More file actions
44 lines (34 loc) · 725 Bytes
/
Copy pathgame.h
File metadata and controls
44 lines (34 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __GAME_H__
#define __GAME_H__
#include <stdlib.h>
#include <stdio.h>
#define T_VERSION "V 0.90"
#define FIELD_WIDTH 11
#define FIELD_HEIGHT 19
#define BLOCKS 7
#define BLOCK_WIDTH 4
#define BLOCK_HEIGHT 4
typedef struct
{
int ox,oy;
int w,h;
}BlockInfo;
int field[FIELD_WIDTH*FIELD_HEIGHT];
int* block[BLOCKS];
int score;
int level;
int lines;
int posX,posY;
BlockInfo bi;
int curBlock,nextBlock;
int removeFullLines(void);
void calcBlockInfo(const int* block,BlockInfo* bi);
void insertBlock(int *block);
void deleteBlock(int *block);
int moveRight(int *block);
int moveLeft(int *block);
int moveDown(int *block);
int rotateRight(int *block);
void initGame(void);
int height(void);
#endif