diff options
| author | Preston Pan <preston@nullring.xyz> | 2023-02-06 19:36:10 -0800 |
|---|---|---|
| committer | Preston Pan <preston@nullring.xyz> | 2023-02-06 19:36:10 -0800 |
| commit | 4cb7cbd3734205bb923c65290e73fe47c85f86a4 (patch) | |
| tree | 6aed241a7dd7f57b7f52e79b38d1eb77742034bb /block.h | |
| parent | 1a4999aa71a2369e86e996e11095e9c2d92e5d84 (diff) | |
add block structure
Diffstat (limited to 'block.h')
| -rw-r--r-- | block.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,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 |
