コード例 #1
0
 public Mark Proccess(Mark input)
 {
     var pheramone = new Pheromone {Value = input.Pheromone.Value};
     input.Pheromone.Value += _pheromoneIncriment.Value;
     var mark = new Mark(input.Path) {Pheromone = pheramone};
     return mark;
 }
コード例 #2
0
ファイル: DecrimentRule.cs プロジェクト: LexaGal/MvcAntsWeb
 public Mark Proccess(Mark input)
 {
     var result = new Mark(input.Path) {Pheromone = {Value = input.Pheromone.Value - _decrimentPheromone.Value}};
     if (result.Pheromone.Value < 0)
     {
         result.Pheromone.Value = 0;
     }
     return result;
 }