summaryrefslogtreecommitdiff
path: root/level.c
diff options
context:
space:
mode:
Diffstat (limited to 'level.c')
-rw-r--r--level.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/level.c b/level.c
index 2c68335..dbf27da 100644
--- a/level.c
+++ b/level.c
@@ -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);
}
}