コード例 #1
0
    public string buildingShortDescription(string building)
    {
        if (building == "Executive Building")
        {
            ExecutiveBuilding x = new ExecutiveBuilding();
            return x.shortDescription;
        }

        if(building == "House")
        {
            House x = new House();
            x.res = resources;
            x.updateDescriptions();
            return x.shortDescription;
        }

        else if(building == "Farm")
        {
            Farm x = new Farm();
            x.res = resources;
            x.updateDescriptions();
            return x.shortDescription;
        }

        else if(building == "Factory")
        {
            Factory x = new Factory();
            x.res = resources;
            x.updateDescriptions();
            return x.shortDescription;
        }

        else if(building == "Executive Building")
        {
            ExecutiveBuilding x = new ExecutiveBuilding();
            return x.shortDescription;
        }

        else if(building == "Educational Building")
        {
            EducationalBuilding x = new EducationalBuilding();
            return x.shortDescription;
        }

        else if(building == "Hospital")
        {
            Hospital x = new Hospital();
            return x.shortDescription;
        }

        else if(building == "Laboratory")
        {
            Laboratory x = new Laboratory();
            return x.shortDescription;
        }

        else if(building == "Police Station")
        {
            PoliceStation x = new PoliceStation();
            return x.shortDescription;
        }

        else if (building == "Workplace")
        {
            Workplace x = new Workplace();
            return x.shortDescription;
        }

        else if(building == "Public Space")
        {
            PublicSpace x = new PublicSpace();
            return x.shortDescription;
        }

        else if(building == "World Trade Center")
        {
            WTC x = new WTC();
            return x.shortDescription;
        }

        else if (building == "Military Outpost")
        {
            MilitaryOutpost x = new MilitaryOutpost();
            return x.shortDescription;
        }

        else if (building == "Food Territory")
        {
            FoodTerritory x = new FoodTerritory();
            return x.shortDescription;
        }

        else if (building == "Materials Territory")
        {
            MaterialsTerritory x = new MaterialsTerritory();
            return x.shortDescription;
        }

        else if (building == "Citizens Territory")
        {
            CitizensTerritory x = new CitizensTerritory();
            return x.shortDescription;
        }

        else
            return "";
    }