Beispiel #1
0
 private int RateBranch(Branch b)
 {
     return(10000 * Grid.Directions.Count(d => CanGoTo(b, d)) + Grid.Distance(b.Last(), b.Other.Last()));
 }
Beispiel #2
0
            private int RateDirection(Branch br, Point dir)
            {
                Point nxt = Grid.NeigbourCoordinates(br.Last(), dir);

                return(10000 * Grid.Directions.Count(d => CanGoTo(nxt, br, d)) + Grid.Distance(nxt, br.Other.Last()));
            }