Exemplo n.º 1
0
        private int countZones(Journey journey)
        {
            var zonesStart = journey.GetStartPoint().GetZone().Split(',');
            var zonesEnd   = journey.GetEndPoint().GetZone().Split(',');

            int x = 10;

            for (int i = 0; i < zonesStart.Length; i++)
            {
                for (int j = 0; j < zonesEnd.Length; j++)
                {
                    int z = int.Parse(zonesStart[i]);
                    int y = int.Parse(zonesEnd[j]);
                    z = Math.Abs(z - y);
                    if (z < x)
                    {
                        x = z;
                    }
                }
            }

            return(Math.Abs(x));
        }
Exemplo n.º 2
0
 private bool isZoneTwo(Journey journey)
 {
     return(journey.GetEndPoint().GetZone().Contains("2") && journey.GetStartPoint().GetZone().Contains("2"));
 }
Exemplo n.º 3
0
 private bool haveZoneOne(Journey journey)
 {
     return(journey.GetEndPoint().GetZone().Contains("1") || journey.GetStartPoint().GetZone().Contains("1"));
 }