예제 #1
0
        /// <summary>
        /// add the next city location to the list of cities
        /// </summary>
        private void Travel()
        {
            if (_salesPerson.CitiesVisited.Count > 0)
            {
                _salesPerson.CitiesVisited.Last().Depart();
            }
            City city = new City(_consoleView.DisplayGetNextCity());

            _salesPerson.CitiesVisited.Add(city);
        }
예제 #2
0
        /// <summary>
        /// add the next city location to the list of cities
        /// </summary>
        private void Travel()
        {
            string nextCity = _consoleView.DisplayGetNextCity();

            //
            // do not add empty strings to list for city names
            //
            if (nextCity != "")
            {
                _salesperson.CitiesVisited.Add(nextCity);
            }
        }