diff --git a/main.c b/main.c index 8dd0639..ddda221 100644 --- a/main.c +++ b/main.c @@ -8,6 +8,7 @@ #include #include #include +#include #define MAZE_SIZE 24 @@ -105,7 +106,10 @@ static void draw_maze(Display *dpy, Window w, GC gc, const maze_t *m) int main(void) { - srand(1891342542362697); + // Seed random number generation from time + struct timeval tv; + gettimeofday(&tv, NULL); + srand(tv.tv_usec); XEvent evt; Display *dpy = XOpenDisplay(NULL);