diff --git a/main.c b/main.c index d8402b4..c0cba96 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,5 @@ -#include #include +#include #include #include #include @@ -59,6 +59,7 @@ const Color text_color = BLACK; const Color hover_color = RED; float timer = 0.0f; +char timer_text[10] = {0}; int need_to_fill = 1; #define INIT_TEXTURE(img, tex) \ @@ -178,13 +179,12 @@ void fill_game(int click_x, int click_y) int x = rand() % game_size.x; int y = rand() % game_size.y; - if (click_x == x && click_y == y) - continue; - - if (game[y][x] == 'X') + if ((click_x == x && click_y == y) || game[y][x] == 'X') { i--; - else - game[y][x] = 'X'; + continue; + } + + game[y][x] = 'X'; } for (int x=0; x