aboutsummaryrefslogtreecommitdiff
path: root/games/gameguess.c
diff options
context:
space:
mode:
authordavid <[email protected]>2026-07-23 22:12:42 -0300
committerdavid <[email protected]>2026-07-23 22:12:42 -0300
commit17881c653f333baa15f9e7b735466a0333a6cee6 (patch)
tree851c25695ca2433714383ecf697e2049e2a6c65e /games/gameguess.c
parent9765de97f1df3bed997eb341172ba4575f5376f3 (diff)
downloadpetratc-17881c653f333baa15f9e7b735466a0333a6cee6.tar.gz
petratc-17881c653f333baa15f9e7b735466a0333a6cee6.zip
fixed a couple bugs
Diffstat (limited to 'games/gameguess.c')
-rw-r--r--games/gameguess.c2
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];