ReD
for (int y = 0; y < layer.height; ++y) {
for (int x = 0; x < layer.width; ++x) {
auto value = perlin_noise.get(x, y, perlin_noise.frequency);
if (value > 0.68) {
layer.set_game_tile_at(x, y, entity_index_type::UNHOOK);
}
else if (value > 0.61) {
layer.set_game_tile_at(x, y, entity_index_type::HOOKABLE);
}
else if (value > 0.52) {
layer.set_game_tile_at(x, y, entity_index_type::FREEZE);
}
else {
layer.set_game_tile_at(x, y, entity_index_type::NONE);
}
}
}