IN101 project on Conway's Game of Life
naive_conway.h
Go to the documentation of this file.
1 
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <stdbool.h>
23 
24 #include "naive_universe.h"
25 #include "naive_pbm_writer.h"
26 
27 #ifndef CONWAY_NAIVE
28 #define CONWAY_NAIVE
29 
40 int naive_count_neighbors(universe u, int row, int column, bool consider_torus);
41 
51 universe naive_step(universe u, bool consider_torus);
52 
63 universe naive_simulation(universe u, bool print_to_console, bool generate_images, bool consider_torus);
64 
65 #endif
universe naive_step(universe u, bool consider_torus)
Get a naive universe&#39;s next iteration. Decrements the universe&#39;s step_nb parameter by one...
Definition: naive_conway.c:40
Header file for a naive implementation of Conway&#39;s game of life ppm image printer.
Header file for a naive implementation of Conway&#39;s game of life universe structure.
universe naive_simulation(universe u, bool print_to_console, bool generate_images, bool consider_torus)
Get the final state of a universe, according to its step_nb parameter.
Definition: naive_conway.c:77
int naive_count_neighbors(universe u, int row, int column, bool consider_torus)
Count alive neighbors of a cell in a given universe.
Definition: naive_conway.c:10
Structure representing a universe: width, height, number of simulation steps and current cells state...
Definition: list_universe.h:18