IN101 project on Conway's Game of Life
linked_list_cell.h
Go to the documentation of this file.
1 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <stdbool.h>
11 
12 #ifndef CONWAY_LINKED_LIST
13 #define CONWAY_LINKED_LIST
14 
15 typedef struct linked_cell linked_cell;
16 typedef linked_cell *linked_list;
17 
19 {
20  int row;
21  int column;
22  linked_list next;
23 };
24 
36 
44 void linked_list_insert_unsorted(linked_list *p_list, int row, int column);
45 
53 void linked_list_insert(linked_list *p_list, int row, int column);
54 
63 void linked_list_delete(linked_list *p_list, int row, int column);
64 
70 void linked_list_free(linked_list list);
71 
72 #endif
void linked_list_free(linked_list list)
Free a linked list from memory.
Definition: linked_list_cell.c:136
void linked_list_insert_unsorted(linked_list *p_list, int row, int column)
Insert an element into a linked list, at the first position.
Definition: linked_list_cell.c:31
void linked_list_delete(linked_list *p_list, int row, int column)
Delete an element from a linked list.
Definition: linked_list_cell.c:104
linked_cell linked_list_get(linked_list list, int idx)
Get a cell from a linked list by its index.
Definition: linked_list_cell.c:10
Definition: linked_list_cell.h:18
void linked_list_insert(linked_list *p_list, int row, int column)
Insert an element into a linked list, sorted by row and column.
Definition: linked_list_cell.c:41