diff options
Diffstat (limited to 'block.c')
| -rw-r--r-- | block.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#include <stdlib.h> +#include "block.h" +#include "config.h" + +block_t *init_block(int type) +{ + block_t *block = malloc(sizeof(block_t)); + block->type = type; + block->rotation = BLOCK_0; + block->x = width / 2; + block->y = 0; + return block; +} |
