Euphoria
|
generator_cell.h
Go to the documentation of this file.
18 // http://www.roguebasin.com/index.php?title=Cellular_Automata_Method_for_Generating_Random_Cave-Like_Levels
Definition: generator_cell.cc:14
void 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
Definition: generator_cell.cc:296
void 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)
Definition: generator_cell.cc:313
void add_random_fill(Rules *cell, Random *random, float random_fill, Lrud< BorderSetupRule > border_control)
fills the world with random data
Definition: generator_cell.cc:213
void add_fill_small_holes_rule(Rules *rules, bool allow_diagonals, int min_count)
fills all open areas that are less than 'min_count'
Definition: generator_cell.cc:334
void add_fill_all_holes_rule(Rules *rules, bool allow_diagonals, int holes_to_keep)
fills all open areas, but keeps 'holes_to_keep'
Definition: generator_cell.cc:345
void 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'
Definition: generator_cell.cc:234
void add_simple_rules(Rules *ca, int times, int count, bool include_self, NeighborhoodAlgorithm algorithm)
simple smoothing, less than count neighbours are removed, more -> solid
Definition: generator_cell.cc:269
void add_complex_rules(Rules *ca, int times, ChangeFunction change)
Definition: generator_cell.cc:254
void add_horizontal_blank_rule(Rules *ca, int y, int height)
blanks out cells at 'y' and 'height' down
Definition: generator_cell.cc:289
std::function< std::optional< bool >(bool, const WallCounter &) > ChangeFunction
Definition: generator_cell.h:61
@ always_wall
Definition: assert.h:90
Definition: table.h:18
Definition: table_bool.h:98
Lrud< core::OutsideRule > outside_rule
Definition: generator_cell.h:47
CellularAutomata(generator::Rules *r, generator::World *w, const Lrud< core::OutsideRule > &fw)
Definition: generator_cell.cc:183
Definition: generator_cell.h:23
virtual ~Rule()=default
void operator=(const Rule &)=delete
Rule()=default
Rule(Rule &&)=delete
void operator=(Rule &&)=delete
virtual void update(CellularAutomata *self)=0
Rule(const Rule &)=delete
Definition: generator_cell.h:37
std::vector< std::shared_ptr< Rule > > rules
Definition: generator_cell.h:38
void add_rule(int count, std::shared_ptr< Rule > rule)
Definition: generator_cell.cc:173