IN101 project on Conway's Game of Life
Functions
list_universe.c File Reference

Source code for a naive implementation of Conway's game of life universe structure. More...

#include "list_universe.h"
Include dependency graph for list_universe.c:

Functions

bool list_universe_get_cell (universe u, int row, int column)
 Get a cell's state from a universe. More...
 
void print_list_cells (universe u)
 Print a universe's cells to the console. More...
 
void print_list_universe (universe u)
 Print a universe to the console. More...
 
void prettyprint_list_universe (universe u)
 Pretty-prints a universe to the console. More...
 

Detailed Description

Source code for a naive implementation of Conway's game of life universe structure.

Author
Victor Colomb (vic.c.nosp@m.ol@h.nosp@m.otmai.nosp@m.l.fr)
Date
2021-03-09

Function Documentation

◆ list_universe_get_cell()

bool list_universe_get_cell ( universe  u,
int  row,
int  column 
)

Get a cell's state from a universe.

Parameters
uuniverse
row
column

◆ prettyprint_list_universe()

void prettyprint_list_universe ( universe  u)

Pretty-prints a universe to the console.

The universe is formatted as follows:

Universe width: {width}
Universe height: {height}
Number of steps: {number of steps}
Universe cells state:
=====================
{universe cells}
Parameters
uuniverse

◆ print_list_cells()

void print_list_cells ( universe  u)

Print a universe's cells to the console.

Parameters
uuniverse

◆ print_list_universe()

void print_list_universe ( universe  u)

Print a universe to the console.

The universe is formatted as follows:

{width} {height}
{number of steps}
Array of cells, . representing a dead cell and 0 a live one.
Parameters
uuniverse