//type (string), name (string), affinity (int). public void AssignMonument(List <string> monumentArgs) { string monumentType = monumentArgs[0]; Monument currentMonument = MonumentFactory.MakeMonument(monumentArgs); this.nations[monumentType].AddMonument(currentMonument); }
public void AssignMonument(List <string> monumentArgs) { Monument monument = MonumentFactory.CreateMonument(monumentArgs); string monumentName = monument.GetTypeName(); this.nations[monumentName].AddMonument(monument); }
public void AssignMonument(List <string> monumentArgs) { var monumentFactory = new MonumentFactory(); var monument = monumentFactory.CreateMonument(monumentArgs); AddMonument(monument); }
public NationsBuilder() { this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.nations = new Dictionary <string, Nation>(); this.warsList = new List <string>(); }
public void AssignMonument(List <string> monumentArgs) { string type = monumentArgs[0]; switch (type) { case "Air": this.Nations[type].Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); //this.AirNation.Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); break; case "Water": this.Nations[type].Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); //this.WaterNation.Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); break; case "Fire": this.Nations[type].Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); //this.FireNation.Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); break; case "Earth": this.Nations[type].Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); //this.EarthNation.Monuments.Add(MonumentFactory.CreateMonument(monumentArgs)); break; } }
public NationsBuilder() { this.allNations = new List <Nation>(); this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.wars = new List <Nation>(); }
public NationsBuilder() { this.benders = new List <Bender>(); this.monuments = new List <Monument>(); this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.wars = new List <string>(); }
public void AssignMonument(List <string> monumentArgs) { Monument monument = MonumentFactory.GetMonument(monumentArgs); string type = monument.GetType().FullName; type = type.Replace("Monument", "Bender"); Nations[type].AddMonument(monument); }
public NationsBuilder() { this.airNation = new Nation("Air"); this.earthNation = new Nation("Earth"); this.fireNation = new Nation("Fire"); this.waterNation = new Nation("Water"); this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.issuedWars = new List <string>(); }
public void AssignMonument(List <string> monumentArgs) { string type = monumentArgs[0]; if (nations.ContainsKey(type)) { Monument monument = MonumentFactory.CreateMonument(monumentArgs); nations[type].AddMonument(monument); } }
public void AssignMonument(List <string> monumentArgs) { var type = monumentArgs[0]; var name = monumentArgs[1]; var affinity = int.Parse(monumentArgs[2]); var monument = MonumentFactory.MakeMonument(type, name, affinity); this.nations[type].Monuments.Add(monument); }
public void AssignMonument(List <string> monumentArgs) { //Monument {type} {name} {affinity} try { var monumentType = monumentArgs[0]; Monument newMonument = MonumentFactory.CreateMonument(monumentArgs); nations[monumentType].AddMonument(newMonument); } catch (Exception) { } }
public NationsBuilder() { this.airNation = new AirNation(); this.earthNation = new EarthNation(); this.fireNation = new FireNation(); this.waterNation = new WaterNation(); this.allNations = new List <Nation>() { airNation, earthNation, fireNation, waterNation }; this.warRecord = new StringBuilder(); this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.warNumber = 1; }
public NationsBuilder() { this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.nationsIssuedWars = new List <string>(); nations = Assembly.GetExecutingAssembly() .GetTypes() .Where(t => t.IsClass && t.Name.EndsWith(nameof(Bender))) .Select(t => t.Name.Substring(0, t.Name.Length - nameof(Bender).Length)) .ToArray(); this.bendersByNation = nations.ToDictionary(nation => nation, value => new List <IBender>()); this.monumentsByNation = nations.ToDictionary(nation => nation, value => new List <IMonument>()); }
public void AssignMonument(List <string> monumentArgs) { string type = monumentArgs[1]; string name = monumentArgs[2]; int affinity = int.Parse(monumentArgs[3]); try { Monument monument = MonumentFactory.CreateMonument(type, name, affinity); nations.Where(n => n.Name == type).FirstOrDefault().AddMonment(monument); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public NationsBuilder() { this.nations = new Dictionary <string, List <Bender> >() { { "Air", new List <Bender>() }, { "Fire", new List <Bender>() }, { "Earth", new List <Bender>() }, { "Water", new List <Bender>() } }; this.monuments = new Dictionary <string, List <Monument> >() { { "Air", new List <Monument>() }, { "Fire", new List <Monument>() }, { "Earth", new List <Monument>() }, { "Water", new List <Monument>() } }; this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); this.issuedWars = new List <string>(); }
public void AssignMonument(List <string> monumentArgs) { Monument monument = MonumentFactory.Create(monumentArgs); string type = monumentArgs[1]; if (type == "Air") { airMonuments.Add(monument); } else if (type == "Water") { waterMonuments.Add(monument); } else if (type == "Fire") { fireMonuments.Add(monument); } else if (type == "Earth") { earthMonuments.Add(monument); } }
public void AssignMonument(List <string> monumentArgs) { var monumentType = monumentArgs[0]; monuments[monumentType].Add(MonumentFactory.CreateMonument(monumentArgs)); }
public void AssignMonument(List <string> monumentArgs) { Monument monument = MonumentFactory.CreateMonument(monumentArgs); nations[monumentArgs[1]].AddMonument(monument); }
public void AssignMonument(List <string> monumentArgs) { Monument monument = MonumentFactory.CreateMonument(monumentArgs); this.monuments.Add(monument); }
public NationsBuilder() { this.InitializeNations(); this.benderFactory = new BenderFactory(); this.monumentFactory = new MonumentFactory(); }
public void AssignMonument(List <string> monumentArgs) { var monument = MonumentFactory.Monument(monumentArgs); monuments[monumentArgs[0]].Add(monument); }