예제 #1
0
 protected override 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 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;
 }