summaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
Diffstat (limited to 'block.h')
-rw-r--r--block.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/block.h b/block.h
new file mode 100644
index 0000000..1f12a72
--- /dev/null
+++ b/block.h
@@ -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