blob: ee212452f2149410d87446b6efaee9b3e9eb45bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "player.h"
#include <stdlib.h>
#include <string.h>
player_list* create_playerlist(void)
{
player_list* pl = malloc(sizeof(player_list));
memset(pl, 0, sizeof(player_list));
return pl;
}
void cleanup_playerlist(player_list* pl)
{
for(int i=0; i<MAX_PLAYERS; i++)
free(pl->names[i]);
free(pl);
}
|