gg
This commit is contained in:
parent
5ad8643416
commit
e0ed8982a0
@ -85,9 +85,9 @@ static const int PIECE_SHAPES[NUM_PIECES][4][4][2] = {
|
|||||||
},
|
},
|
||||||
/* L piece */
|
/* L piece */
|
||||||
{
|
{
|
||||||
{{-1, 0}, {0, 0}, {1, 0}, {-1, 1}},
|
{{-1, 0}, {0, 0}, {1, 0}, {1, -1}},
|
||||||
{{0, -1}, {0, 0}, {0, 1}, {1, 1}},
|
{{0, -1}, {0, 0}, {0, 1}, {1, 1}},
|
||||||
{{-1, -1}, {-1, 0}, {0, 0}, {1, 0}},
|
{{-1, 0}, {0, 0}, {1, 0}, {-1, 1}},
|
||||||
{{0, -1}, {0, 0}, {0, 1}, {-1, -1}}
|
{{0, -1}, {0, 0}, {0, 1}, {-1, -1}}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -177,7 +177,7 @@ void spawn_piece(GameState* state) {
|
|||||||
state->piece_type = state->next_piece_type;
|
state->piece_type = state->next_piece_type;
|
||||||
state->next_piece_type = rand() % NUM_PIECES;
|
state->next_piece_type = rand() % NUM_PIECES;
|
||||||
state->piece_x = BOARD_WIDTH / 2;
|
state->piece_x = BOARD_WIDTH / 2;
|
||||||
state->piece_y = 0;
|
state->piece_y = 1;
|
||||||
state->piece_rotation = 0;
|
state->piece_rotation = 0;
|
||||||
|
|
||||||
/* Check if game is over (piece can't spawn) */
|
/* Check if game is over (piece can't spawn) */
|
||||||
|
|||||||
BIN
final/main.o
BIN
final/main.o
Binary file not shown.
BIN
final/tetris
BIN
final/tetris
Binary file not shown.
Loading…
Reference in New Issue
Block a user