4#ifndef BRICK_GAME_V1_0_BRICK_GAME_TETRIS_PIECE_H_
5#define BRICK_GAME_V1_0_BRICK_GAME_TETRIS_PIECE_H_
12#define PIECE_TYPE_COUNT 7
PieceType
Possible piece types.
Definition piece.h:23
#define PIECE_ROWS
Number of rows in PieceData::blocks.
Definition piece.h:8
int piece_spawn_height_offset(PieceType piece_type)
Get the offset at which we should spawn the piece on the field.
Definition piece.c:158
PieceData get_piece_data(PieceType piece_type, int rotation)
Get the block data from piece type and rotation.
Definition piece.c:128
#define PIECE_COLS
Number of columns in PieceData::blocks.
Definition piece.h:10
An array of blocks the piece consists of.
Definition piece.h:15
State of the currently played piece.
Definition piece.h:34
int x
X offset of the upper left corner of the piece data.
Definition piece.h:36
PieceType piece_type
The type of the piece being played.
Definition piece.h:42
int rotation
Rotation of the piece, [0; 3].
Definition piece.h:40
int y
Y offset of the upper left corner of the piece data.
Definition piece.h:38