blob: 08f84940a024492d12d594596da6d1c0b07d7249 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <stdlib.h>
#include "block.h"
#include "config.h"
block_t *init_block(int type, int width)
{
block_t *block = malloc(sizeof(block_t));
block->type = type;
block->rotation = BLOCK_0;
block->x = width / 2;
block->y = 0;
return block;
}
|