IN101 project on Conway's Game of Life
naive_universe.h
Go to the documentation of this file.
1 
21 #ifndef CONWAY_NAIVE_UNIVERSE
22 #define CONWAY_NAIVE_UNIVERSE
23 
24 #include <stdio.h>
25 #include <string.h>
26 
27 typedef struct universe universe;
28 
34 struct universe
35 {
36  int width;
37  int height;
38  int step_nb;
39  char *cells;
40 };
41 
53 char naive_universe_get_cell(universe u, int row, int column);
54 
63 void naive_universe_update_cell(universe u, int row, int column, char state);
64 
71 
86 
104 
105 #endif
char naive_universe_get_cell(universe u, int row, int column)
Get a cell from a universe.
Definition: naive_universe.c:10
Structure representing a universe: width, height, number of simulation steps and current cells state...
Definition: list_universe.h:18
void print_naive_cells(universe u)
Print a universe&#39;s cells state.
Definition: naive_universe.c:20
void prettyprint_naive_universe(universe u)
Pretty-prints a universe to the console.
Definition: naive_universe.c:34
void naive_universe_update_cell(universe u, int row, int column, char state)
Update a given cell from a universe to a given state.
Definition: naive_universe.c:15
void print_naive_universe(universe u)
Print a universe to the console.
Definition: naive_universe.c:28