Example #1
0
 public World <State> WithRules(RuleSet <State> rules)
 {
     return(new World <State>(Cells, Bounds, Neighborhood, rules));
 }
Example #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;
 }
Example #3
0
 public World(IEnumerable <Cell <State> > cells, Bounds bounds, INeighborhood neighborhood, RuleSet <State> rules)
 {
     Cells        = cells;
     Bounds       = bounds;
     Neighborhood = neighborhood;
     Rules        = rules;
 }
Example #4
0
 public void SetRules(RuleSet <State> ruleset)
 {
     Rules = ruleset;
 }