public string FindToolProficiency(Dictionaries.ToolTypes input)
 {
     if (ToolProficiencies.Count != 0)
     {
         if (ToolProficiencies.Contains(input))
         {
             StringBuilder output = new StringBuilder();
             foreach (Dictionaries.ToolTypes ToolProficiency in ToolProficiencies)
             {
                 if (input == ToolProficiency)
                 {
                     output.AppendLine($"{ToolProficiency}");
                 }
             }
             return(output.ToString());
         }
         else
         {
             return("This tool proficiency is not in this list");
         }
     }
     else
     {
         return("The list of tool proficiencies is empty");
     }
 }
 public bool RemoveToolProficiency(Dictionaries.ToolTypes input)
 {
     if (ToolProficiencies.Contains(input))
     {
         ToolProficiencies.Remove(input);
         return(true);
     }
     else
     {
         return(false);
     }
 }
 public bool AddToolProficiency(Dictionaries.ToolTypes input)
 {
     if (ToolProficiencies.Contains(input))
     {
         return(false);
     }
     else
     {
         ToolProficiencies.Add(input);
         return(true);
     }
 }
Example #4
0
 private Tool(string name, double cost, double weight, Dictionaries.ToolTypes toolType) : base(name, cost, weight)
 {
     ToolType        = toolType;
     ToolProficiency = SetToolProficiency();
 }