nxcgol
An implementation of Conway's Game of Life for the Nintendo Switch
 
Loading...
Searching...
No Matches
Config

Data Structures

struct  Color
 
struct  Config
 

Functions

bool parse_rgb (const char *value, Color *color)
 parse r,g,b string into Color
 
void parse_config_file (Config *config)
 parse configuration file
 

Variables

Config config
 default configuration
 
bool matrix [COLS][ROWS]
 
bool matrix_next [COLS][ROWS]
 
bool history [HISTORY_SIZE][COLS][ROWS]
 
int history_index = 0
 generations in history, for comparison to check for oscillation
 
int generation_index = 0
 generation number
 
int restart_index = 0
 colony number
 
int stagnant_index = 0
 number of generations colony has been stagnant
 

Detailed Description

Function Documentation

◆ parse_config_file()

void parse_config_file ( Config config)

parse configuration file

Parameters
configpopulates Config config

◆ parse_rgb()

bool parse_rgb ( const char *  value,
Color color 
)

parse r,g,b string into Color

Variable Documentation

◆ config

Config config
Initial value:
= {
.simulation_speed = 100,
.density = 30,
.show_stats = false,
.auto_restart = true,
.stagnant_wait = 100,
.colorful = true,
.stable = {86, 252, 3},
.growth = {3, 252, 219},
.dense = {252, 231, 3},
.sparce = {252, 3, 3},
}

default configuration

◆ generation_index

int generation_index = 0

generation number

◆ history

bool history[HISTORY_SIZE][COLS][ROWS]

◆ history_index

int history_index = 0

generations in history, for comparison to check for oscillation

◆ matrix

bool matrix[COLS][ROWS]

◆ matrix_next

bool matrix_next[COLS][ROWS]

◆ restart_index

int restart_index = 0

colony number

◆ stagnant_index

int stagnant_index = 0

number of generations colony has been stagnant