add colour selection based on ID

This commit is contained in:
2025-01-27 16:19:07 +01:00
parent 1097c6e09d
commit 2dbdc5ac40
3 changed files with 25 additions and 2 deletions

View File

@@ -39,7 +39,12 @@ void tmp_set_all(GameData* game_data) {
}
void tmp_set_random(GameData* game_data) {
uint32_t x = rand() % TETROMINO_COUNT;
ShapeId id = rand() % TETROMINO_COUNT;
//set_shape(game_data->row, shape, colour, 1, 1);
static int finished = 0;
if (finished)
return;
finished = 1;
set_shape(game_data->row, shape_from_id(id), colour_from_id(id), 1, 1);
}