Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Created by merlin on 4/4/2022.
- //
- #ifndef LAB5_LISTS_H
- #define LAB5_LISTS_H
- typedef struct player_s{
- int player_id;
- int player_exp_points;
- struct player_s *next;
- } player_node;
- typedef struct {
- player_node *head;
- player_node *tail;
- } list_t;
- list_t *create_empty_list();
- void add_at_head(list_t *list, int player_id, int player_exp_points);
- void add_at_tail(list_t *list, int player_id, int player_exp_points);
- void insert(list_t *list, int player_id, int player_exp_points);
- player_node *find(list_t *list, int target_player_id);
- bool delete(list_t *list, int player_id);
- void print_list(list_t *list);
- #endif //LAB5_LISTS_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement