public static int GetLeft(IList <MicroPlannerMessage> messages, IRoutingInterpreter interpreter)
        {
            int left = 0;

            foreach (MicroPlannerMessage message in messages)
            {
                if (message is MicroPlannerMessagePoint)
                {
                    MicroPlannerMessagePoint point = (message as MicroPlannerMessagePoint);
                    left = left + MicroPlannerHelper.GetLeft(point, interpreter);
                }
            }
            return(left);
        }
        public static int GetStraightOn(IList <MicroPlannerMessage> messages, IRoutingInterpreter interpreter)
        {
            int straight = 0;

            foreach (MicroPlannerMessage message in messages)
            {
                if (message is MicroPlannerMessagePoint)
                {
                    MicroPlannerMessagePoint point = (message as MicroPlannerMessagePoint);
                    straight = straight + MicroPlannerHelper.GetStraightOn(point, interpreter);
                }
            }
            return(straight);
        }
        public static int GetStraightOn(MicroPlannerMessagePoint point, IRoutingInterpreter interpreter)
        {
            int straight = 0;

            if (point.Point.ArcsNotTaken != null)
            {
                foreach (KeyValuePair <RelativeDirection, AggregatedArc> arc_pair in point.Point.ArcsNotTaken)
                {
                    if (!MicroPlannerHelper.IsTurn(arc_pair.Key.Direction, interpreter))
                    {
                        if (interpreter.EdgeInterpreter.IsRoutable(arc_pair.Value.Tags))
                        {
                            straight++;
                        }
                    }
                }
            }
            return(straight);
        }