next block rendering

This commit is contained in:
2025-02-03 16:24:12 +01:00
parent a9541812e0
commit be800d2612
2 changed files with 9 additions and 6 deletions

View File

@@ -24,6 +24,7 @@ void next_shape(GameData* const game_data) {
game_data->curr_idx = 0;
// BUG: seventh element is overritten (but when starting the seventh element will always be J if we just exclude the last one from sorting)
// shuffle the next shapes using a FisherYates shuffle
for (uint8_t i = 0; i < (TETROMINO_COUNT - 1); i++) {
const uint8_t j = i + rand() % (TETROMINO_COUNT - i);