breakhack/src/random.c

11 lines
154 B
C

#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
unsigned int
get_random(unsigned int max)
{
srand(time(NULL));
return rand() % (max + 1);
}