Add option to set random seed for deterministic behavior
Bump version to 1.6
This commit is contained in:
@@ -10,6 +10,8 @@ mazeoptions_t* mazemaker_options_new() {
|
||||
// set defaults
|
||||
memset(result->wall_color, 0, 3);
|
||||
memset(result->background_color, 0xff, 3);
|
||||
result->seed = 0;
|
||||
result->seed_set = false;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -78,3 +80,7 @@ int mazemaker_options_set_background_color(mazeoptions_t* options, char const* c
|
||||
return stringToColor(color_desc, options->background_color);
|
||||
}
|
||||
|
||||
void mazemaker_options_set_seed(mazeoptions_t* options, rand_seed_t seed) {
|
||||
options->seed = seed;
|
||||
options->seed_set = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user