Esempio n. 1
0
 public World <State> WithRules(RuleSet <State> rules)
 {
     return(new World <State>(Cells, Bounds, Neighborhood, rules));
 }
Esempio n. 2
0
 public World(IEnumerable <State> states, Bounds bounds, INeighborhood neighborhood, RuleSet <State> rules)
 {
     Cells        = states.Select((st, i) => new Cell <State>(st, IndexToPosition(i)));
     Bounds       = bounds;
     Neighborhood = neighborhood;
     Rules        = rules;
 }
Esempio n. 3
0
 public World(IEnumerable <Cell <State> > cells, Bounds bounds, INeighborhood neighborhood, RuleSet <State> rules)
 {
     Cells        = cells;
     Bounds       = bounds;
     Neighborhood = neighborhood;
     Rules        = rules;
 }
Esempio n. 4
0
 public void SetRules(RuleSet <State> ruleset)
 {
     Rules = ruleset;
 }