protected override Location CreateLocation(string locationTypeString, string locationName)
        {
            Location location = null;

            switch (locationTypeString)
            {
                case "forest": location = new Forest(locationName); break;
                case "mine": location = new Mine(locationName); break;
                default: return base.CreateLocation(locationTypeString, locationName);
            }

            return location;
        }
 protected virtual Location CreateLocation(string locationTypeString, string locationName)
 {
     Location location = null;
     switch (locationTypeString)
     {
         case "town":
             location = new Town(locationName);
             break;
         case "forest":
             location = new Forest(locationName);
             break;
         case "mine":
             location = new Forest(locationName);
             break;
         default:
             break;
     }
     return location;
 }
        protected override Location CreateLocation(string locationTypeString, string locationName)
        {
            Location location = null;

            switch (locationTypeString)
            {
            case "mine":
                location = new Mine(locationName);
                break;

            case "forest":
                location = new Forest(locationName);
                break;

            default:
                base.CreateLocation(locationTypeString, locationName);
                break;
            }
            return(location);
        }
Пример #4
0
        protected virtual Location CreateLocation(string locationTypeString, string locationName)
        {
            Location location = null;

            switch (locationTypeString)
            {
            case "town":
                location = new Town(locationName);
                break;

            case "forest":
                location = new Forest(locationName);
                break;

            case "mine":
                location = new Forest(locationName);
                break;

            default:
                break;
            }
            return(location);
        }
        protected override Location CreateLocation(string locationTypeString, string locationName)
        {
            Location location = null;

            switch (locationTypeString)
            {
            case "mine":
            {
                location = new Mine(locationName);
                return(location);
            }

            case "forest":
            {
                location = new Forest(locationName);
                return(location);
            }

            default:
            {
                return(base.CreateLocation(locationTypeString, locationName));
            }
            }
        }