diff options
Diffstat (limited to 'level.c')
-rw-r--r-- | level.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,7 @@ #include "level.h" #include "lzr.h" #include "cfg.h" +#include <stdlib.h> static const char level[LEVEL_HEIGHT * LEVEL_WIDTH] = { "000000000000" @@ -28,7 +29,8 @@ void level_draw() for (int x = 0; x < LEVEL_WIDTH; x++) { const int dx = (x + 3) * CFG_TSIZE; const int dy = y * CFG_TSIZE; - if (level_get(x, y) == '0') + if (level_get(x, y) == '0' && ((rand() & 3) == 3 || + LZR_GetTick() & 1)) LZR_DrawRectangle(true, dx, dy, CFG_TSIZE, CFG_TSIZE); } } |