public IEquipment AddEnchantment(IEquipment equip) { IEquipment equip2 = equip; Console.Write(String.Format(ApplicationSettings .AddEnchantmentPrompt)); Selection selectOrb = (Selection)Enum.Parse(typeof(Selection), Console.ReadLine(), true); switch (selectOrb) { case Selection.A: { equip2 = new BlueOrb(equip); break; } case Selection.B: { equip2 = new GreenOrb(equip); break; } case Selection.C: { equip2 = new RedOrb(equip); break; } default: break; } return(equip2); }
public IEquipment AddEnchantment(IEquipment equip) { IEquipment equip2 = equip; Console.Write(String.Format(ApplicationSettings.AddEnchantmentPrompt)); Selection selectOrb = (Selection)Enum.Parse(typeof(Selection), Console.ReadLine(), true); switch (selectOrb) { case Selection.A: { equip2 = new BlueOrb(equip); break; } case Selection.B: { equip2 = new GreenOrb(equip); break; } case Selection.C: { equip2 = new RedOrb(equip); break; } } return equip2; }