IN101 project on Conway's Game of Life
Functions
naive_pbm_writer.h File Reference

Header file for a naive implementation of Conway's game of life ppm image printer. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "naive_universe.h"
Include dependency graph for naive_pbm_writer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void naive_generate_image (universe u, int idx)
 Generate the image corresponding to a universe.
Image will be of PPM format and created in the out folder, with the filename idx-XXX.ppm where XXX in the the image index. More...
 
void naive_generate_image_filename (universe u, char *filename)
 Generate the image corresponding to a universe.
Image will be of PPM format. More...
 

Detailed Description

Header file for a naive implementation of Conway's game of life ppm image printer.

Author
Victor Colomb (vic.c.nosp@m.ol@h.nosp@m.otmai.nosp@m.l.fr)
Version
0.1
Date
2021-02-22

Naive implementation of the Conway's game of life:
The universe's size if given and constant.
The universe state is recorded using a character list (string) following the convention . for dead and o for alive.

API

Function Documentation

◆ naive_generate_image()

void naive_generate_image ( universe  u,
int  idx 
)

Generate the image corresponding to a universe.
Image will be of PPM format and created in the out folder, with the filename idx-XXX.ppm where XXX in the the image index.

Parameters
uuniverse
idximage index, used for its filename

◆ naive_generate_image_filename()

void naive_generate_image_filename ( universe  u,
char *  filename 
)

Generate the image corresponding to a universe.
Image will be of PPM format.

Parameters
uuniverse
filename