Esempio n. 1
0
 private void Awake()
 {
     AssociateGUI();
     GetColors();
     ruleCreator = new RuleCreator();
     SceneManager.directoryRules = this.direcotyRules;
 }
Esempio n. 2
0
        public void Setup()
        {
            var overcrowdingRule = RuleCreator.GetOvercrowdingRule();

            var cellAliveRequirement = new InitialStateRequirement(new HashSet <CellState> {
                CellState.Alive
            });
            var eightNeighboursRequirement = new ActiveNeighbourRequirement(new HashSet <int> {
                8
            });

            var superOvercrowdingRequirements = new List <IRequirement> {
                cellAliveRequirement, eightNeighboursRequirement
            };
            var superOvercrowdingRule = new Rule(superOvercrowdingRequirements, CellState.Alive);

            var rules = new Dictionary <int, Rule>
            {
                { 1, superOvercrowdingRule },
                { 2, overcrowdingRule }
            };

            _ruleSet = new RuleSet(rules);
        }
 public void Setup()
 {
     _overcrowdingRule = RuleCreator.GetOvercrowdingRule();
 }