feat: Random number seeding

This commit is contained in:
Tristan Russell 2025-01-17 22:12:44 -05:00
parent 7446804451
commit a55d8f564f
1 changed files with 2 additions and 0 deletions

2
main.c
View File

@ -9,6 +9,7 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <time.h>
int SetupServer(int* socket_fd, int port) { int SetupServer(int* socket_fd, int port) {
printf("[Client] Starting Server\n"); printf("[Client] Starting Server\n");
@ -65,6 +66,7 @@ int StartEnv(int port) {
int client_size = sizeof(client_addr); int client_size = sizeof(client_addr);
int client_sock = accept(socket_fd, (struct sockaddr*)&client_addr, &client_size); int client_sock = accept(socket_fd, (struct sockaddr*)&client_addr, &client_size);
srand(time(NULL));
int obs_size = sizeof(struct Observation); int obs_size = sizeof(struct Observation);
struct SS13ArcadeEnv env; struct SS13ArcadeEnv env;
CreateEnvironment(&env); CreateEnvironment(&env);