From accfa715e5e012b746a1e12652a75b3fea672f3c Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 29 Jan 2025 16:02:59 +0100 Subject: [PATCH] fix: not initializing rand properly --- src/game/game.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/game.c b/src/game/game.c index 1dd3496..f15127d 100644 --- a/src/game/game.c +++ b/src/game/game.c @@ -25,12 +25,12 @@ void game_init(GameData* const game_data) { for (uint8_t i = 0; i < ROWS; i++) game_data->row[i] = game_data->row_raw[i]; + // set a random seed using the system clock + srand(time(NULL)); + set_next_shape(game_data); game_data->selected = (SelectedShape){game_data->next_shape, 0, 0}; set_next_shape(game_data); - - // set a random seed using the system clock - srand(time(NULL)); } // called every time the game's state is updated