public void AssignBender(List <string> benderArgs) { var type = benderArgs[1]; Bender bender = BenderFactory.CreateBender(benderArgs); this.nations.Where(n => n.Name == type).FirstOrDefault().Benders.Add(bender); }
public void AssignBender(List <string> benderArgs) { string type = benderArgs[0]; switch (type) { case "Air": this.Nations[type].Benders.Add(BenderFactory.CreateBender(benderArgs)); //this.AirNation.Benders.Add(BenderFactory.CreateBender(benderArgs)); break; case "Water": this.Nations[type].Benders.Add(BenderFactory.CreateBender(benderArgs)); //this.WaterNation.Benders.Add(BenderFactory.CreateBender(benderArgs)); break; case "Fire": this.Nations[type].Benders.Add(BenderFactory.CreateBender(benderArgs)); //this.FireNation.Benders.Add(BenderFactory.CreateBender(benderArgs)); break; case "Earth": this.Nations[type].Benders.Add(BenderFactory.CreateBender(benderArgs)); //this.EarthNation.Benders.Add(BenderFactory.CreateBender(benderArgs)); break; } }
public void AssignBender(List <string> benderArgs) { Bender bender = BenderFactory.CreateBender(benderArgs); string benderName = bender.GetTypeName(); this.nations[benderName].AddMember(bender); }
public void AssignBender(List <string> benderArgs) { var benderFactory = new BenderFactory(); var bender = benderFactory.CreateBender(benderArgs); Nation.AddBender(bender); }
public void AssignBender(List <string> benderArgs) { string type = benderArgs[0]; if (nations.ContainsKey(type)) { Bender bender = BenderFactory.CreateBender(benderArgs); nations[type].AddBender(bender); } }
public void AssignBender(List <string> benderArgs) { string type = benderArgs[0]; string name = benderArgs[1]; int power = int.Parse(benderArgs[2]); decimal secondaryParameter = decimal.Parse(benderArgs[3]); Bender bender = benderFactory.CreateBender(type, name, power, secondaryParameter); this.nations[type].AddBender(bender); }
public void AssignBender(List <string> benderArgs) { string type = benderArgs[0]; string name = benderArgs[1]; int power = int.Parse(benderArgs[2]); double secondaryParameter = double.Parse(benderArgs[3]); IBender bender = benderFactory.CreateBender(type, name, power, secondaryParameter); this.bendersByNation[type].Add(bender); }
public void AssignBender(List <string> benderArgs) { nation = allNations.FirstOrDefault(n => n.Type == benderArgs[0]); if (nation == null) { nation = new Nation(benderArgs[0]); this.allNations.Add(nation); } nation.AssignBender(benderFactory.CreateBender(benderArgs)); }
public void AssignBender(List <string> benderArgs) { //Bender {type} {name} {power} {secondaryParameter} try { var benderType = benderArgs[0]; Bender newBender = BenderFactory.CreateBender(benderArgs); nations[benderType].AddBender(newBender); } catch (Exception) { } }
public void AssignBender(List <string> benderArgs) { string type = benderArgs[1]; string name = benderArgs[2]; int power = int.Parse(benderArgs[3]); double secondaryParameter = double.Parse(benderArgs[4]); try { Bender bender = BenderFactory.CreateBender(type, name, power, secondaryParameter); nations.Where(n => n.Name == type).FirstOrDefault().AddBender(bender); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void AssignBender(List <string> benderArgs) { var benderType = benderArgs[0]; benders[benderType].Add(BenderFactory.CreateBender(benderArgs)); }
public void AssignBender(List <string> benderArgs) { var newBender = benderFactory.CreateBender(benderArgs); this.nations[benderArgs[1]].Add(newBender); }
public void AssignBender(List <string> benderArgs) { Bender bender = BenderFactory.CreateBender(benderArgs); this.benders.Add(bender); }
public void AssignBender(List <string> benderArgs) { Bender bender = BenderFactory.CreateBender(benderArgs); nations[benderArgs[1]].AddBender(bender); }
public void AssignBender(string[] line) { var bender = benderFactory.CreateBender(line); nations[line[1]].benders.Add(bender); }