コード例 #1
0
        private IEvolutionRule GetEvolutionRule()
        {
            INeighbourRule neighbourrule = neighbourrulefactory.Create(grid);
            IEvolutionRule evolutionrule = evolutionaryrulefactory.CreateEvolutionRule(neighbourrule);

            return(evolutionrule);
        }
コード例 #2
0
 public IEvolutionRule CreateEvolutionRule(INeighbourRule neighbourRule)
 {
     // for now return hard coded rule. TODO: This needs to become dynamic
     return(new BasicTwoDimensionalEvolutionRule(neighbourRule));
 }
コード例 #3
0
 public IRule CreateRule(INeighbourRule neighbourRule)
 {
     //This will return hard code rule, this need to be driven through config.
     return new MatrixRule(neighbourRule);
 }
コード例 #4
0
 public BasicTwoDimensionalEvolutionRule(INeighbourRule neighbourRule)
 {
     this.neighbourRule = neighbourRule;
 }
コード例 #5
0
 public BasicTwoDimensionalEvolutionRule(INeighbourRule neighbourRule)
 {
     this.neighbourRule = neighbourRule;
 }
コード例 #6
0
ファイル: MatrixRule.cs プロジェクト: vishalsharmaind/GameOfL
 /// <summary>
 /// Constructor of the class.
 /// </summary>
 /// <param name="neighbourRule"></param>
 public MatrixRule(INeighbourRule neighbourRule)
 {
     this.neighbourRule = neighbourRule;
 }
コード例 #7
0
 public IEvolutionRule CreateEvolutionRule(INeighbourRule neighbourRule)
 {
     // for now return hard coded rule. TODO: This needs to become dynamic
     return new BasicTwoDimensionalEvolutionRule(neighbourRule);
 }