summaryrefslogtreecommitdiff
path: root/block.h
blob: 1f12a72d9ab5a37ee69340728ff4e0721db04cc7 (plain)
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
#ifndef BLOCK_H
#define BLOCK_H
typedef struct {
    enum {
	BLOCK_T,
	BLOCK_RL,		/* L block with the bottom part facing
				right */
	BLOCK_LL,		/* L block with the bottom part facing
				left */
	BLOCK_I,
	BLOCK_RS,
	BLOCK_LS,
    } type;

    enum {
	BLOCK_0,
	BLOCK_90,
	BLOCK_180,
	BLOCK_270,
    } rotation;

    int x;
    int y;
} block_t;

block_t *init_block(int type);
#endif