Пример #1
0
 public IEnumerable<Postion> Sourround(RasterPositionValue[,] cost,
     Postion postion)
 {
     if (VisistedValid(cost, postion.LeftTop()))
         yield return postion.LeftTop();
     if (VisistedValid(cost, postion.Top()))
         yield return postion.Top();
     if (VisistedValid(cost, postion.RightTop()))
         yield return postion.RightTop();
     if (VisistedValid(cost, postion.Right()))
         yield return postion.Right();
     if (VisistedValid(cost, postion.RightButtom()))
         yield return postion.RightButtom();
     if (VisistedValid(cost, postion.Buttom()))
         yield return postion.Buttom();
     if (VisistedValid(cost, postion.LeftButtom()))
         yield return postion.LeftButtom();
     if (VisistedValid(cost, postion.Left()))
         yield return postion.Left();
 }