Header file for a linked list implementation of Conway's game of life universe structure.
More...
#include <stdio.h>
#include <stdbool.h>
#include "linked_list_cell.h"
Go to the source code of this file.
|
struct | universe |
| Structure representing a universe: width, height, number of simulation steps and current cells state. More...
|
|
Header file for a linked list 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
◆ list_universe_get_cell()
bool list_universe_get_cell |
( |
universe |
u, |
|
|
int |
row, |
|
|
int |
column |
|
) |
| |
Get a cell's state from a universe.
- Parameters
-
◆ 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:
=====================
- Parameters
-
◆ print_list_cells()
Print a universe's cells to the console.
- Parameters
-
◆ print_list_universe()
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
-