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