using System; namespace DesertPaintLab { public class Reagent { string name; bool isCatalyst = false; int cost = 0; PaintColor color; public bool IsCatalyst { get { return isCatalyst; } } public PaintColor Color { get { return color; } } public string Name { get { return name; } } public Reagent(string name, int cost) { this.name = name; this.cost = cost; isCatalyst = true; } public Reagent(string name, byte red, byte green, byte blue, int cost) { color = new PaintColor(red, green, blue); this.name = name; this.cost = cost; } public override string ToString() { if (isCatalyst) { return "[" + name + ", catalyst]"; } else { return "[" + name + ", " + color.ToString() + "]"; } } } }