Euphoria
generator_cell.h File Reference
#include "base/lrud.h"
#include "core/table_bool.h"

Go to the source code of this file.

Classes

struct  eu::core::generator::Rule
 
struct  eu::core::generator::Rules
 
struct  eu::core::generator::CellularAutomata
 

Namespaces

 eu
 
 eu::core
 
 eu::core::generator
 

Typedefs

using eu::core::generator::World = BoolTable
 
using eu::core::generator::ChangeFunction = std::function< std::optional< bool >(bool, const WallCounter &) >
 

Functions

void eu::core::generator::add_random_fill (Rules *cell, Random *random, float random_fill=0.5, Lrud< BorderSetupRule > border_control=Lrud< BorderSetupRule > { BorderSetupRule::always_wall })
 fills the world with random data More...
 
void eu::core::generator::add_clear_rules (Rules *ca, int times, int count, int range, bool include_self, NeighborhoodAlgorithm algorithm)
 'clears' cells with less than 'count' neighbours, good for removing 'blobs' More...
 
void eu::core::generator::add_complex_rules (Rules *ca, int times, ChangeFunction change)
 
void eu::core::generator::add_simple_rules (Rules *ca, int times, int count, bool include_self, NeighborhoodAlgorithm algorithm)
 simple smoothing, less than count neighbours are removed, more -> solid More...
 
void eu::core::generator::add_horizontal_blank_rule (Rules *ca, int y, int height)
 blanks out cells at 'y' and 'height' down More...
 
void eu::core::generator::add_spiky_rules (Rules *ca, int times, int count, bool include_self, NeighborhoodAlgorithm algorithm)
 simple smoothing, but always set the cell, seems to provide spikes More...
 
void eu::core::generator::add_combo_rules (Rules *ca, int times, int count, int big_count, bool include_self, NeighborhoodAlgorithm algorithm)
 smooth but 'big_count' is applied for R(2) More...
 
void eu::core::generator::add_fill_small_holes_rule (Rules *rules, bool allow_diagonals, int min_count)
 fills all open areas that are less than 'min_count' More...
 
void eu::core::generator::add_fill_all_holes_rule (Rules *rules, bool allow_diagonals, int holes_to_keep)
 fills all open areas, but keeps 'holes_to_keep' More...