Allows drawing path to solution

This commit is contained in:
2022-01-18 20:05:30 -05:00
parent 08d49fbd26
commit f10d4061bd
6 changed files with 271 additions and 42 deletions

View File

@@ -10,6 +10,8 @@ mazeoptions_t* mazemaker_options_new() {
// set defaults
memset(result->wall_color, 0, 3);
memset(result->background_color, 0xff, 3);
result->path_color[0] = 0xff;
result->path_color[1] = result->path_color[2] = 0;
result->seed = 0;
result->seed_set = false;
@@ -80,6 +82,10 @@ int mazemaker_options_set_background_color(mazeoptions_t* options, char const* c
return stringToColor(color_desc, options->background_color);
}
int mazemaker_options_set_path_color(mazeoptions_t* options, char const* color_desc) {
return stringToColor(color_desc, options->path_color);
}
void mazemaker_options_set_seed(mazeoptions_t* options, rand_seed_t seed) {
options->seed = seed;
options->seed_set = true;