diff options
Diffstat (limited to 'games/gameguess.c')
| -rw-r--r-- | games/gameguess.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/games/gameguess.c b/games/gameguess.c index fc29839..47a0be9 100644 --- a/games/gameguess.c +++ b/games/gameguess.c @@ -2,6 +2,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <time.h> #include <ncurses.h> #include "../rat.h" @@ -42,6 +43,7 @@ void gameguess(){ int solved = 0; int range = 100; + srand(time(NULL)); int correct = (rand() % (range + 1)); int history[maxhistory]; |
