summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/player.h b/src/player.h
index f162cfa..41e928b 100644
--- a/src/player.h
+++ b/src/player.h
@@ -2,16 +2,27 @@
#define OXEN_PLAYER_H
#define MAX_PLAYERS 10
+#define MAX_PLAYER_NAME_LENGTH 10
#include <stdint.h>
-#include "pnoc.h"
+#include "card.h"
+
+typedef uint8_t player_id_t;
+
+typedef struct
+{
+ player_id_t player_id;
+ char player_name[MAX_PLAYER_NAME_LENGTH + 1];
+ card open_card;
+} player_list_entry_t;
typedef struct
{
uint8_t count;
- pnoc_t players[MAX_PLAYERS];
-} player_list;
+ player_list_entry_t players[MAX_PLAYERS];
+} player_list_t;
-pnoc_t* get_pnoc_from_playerid(player_list* pl, const uint8_t pid);
+player_list_entry_t *get_player_list_entry_by_player_id(player_list_t *pl, const player_id_t pid);
+void player_list_sort_by_open_card(player_list_t *pl, const uint8_t num_entries);
#endif // OXEN_PLAYER_H