Exemple #1
0
    public void AssignMonument(List <string> monumentArgs)
    {
        string type    = monumentArgs[0];
        string name    = monumentArgs[1];
        int    afinity = int.Parse(monumentArgs[2]);

        switch (type)
        {
        case "Air":
            airnation.AddMonumnet(new AirMonument(name, afinity));
            break;

        case "Water":
            waternation.AddMonumnet(new WaterMonument(name, afinity));
            break;

        case "Fire":
            firenation.AddMonumnet(new FireMonument(name, afinity));
            break;

        case "Earth":
            earthnation.AddMonumnet(new EarthMonument(name, afinity));
            break;

        default:
            throw new ArgumentException("no Monument Added");
        }
    }