I'm implementing a basic skill and attribute system, though I'm having second thoughts about how I should go about it.
For example, I could use a Dictionary/HashMap which uses SkillType enums to represent keys, and integer values representing the values. But should I do this?
public class Skills
{
public IDictionary<StatType, Int> skills; //StatType is enum, being the key; the int //is the value.
}
vs.
public class Skills
{
public int LongBlade, Armor, Marksman; //...etc
}
I'd like to know the benefits of type safety here, as opposed to just using basic integers. Any recommendations?
interface Skill { /* ... */ int toInt(); }; public class Skills : IList { private ArrayList<Skill> skills; /* ... */ };
, actually ... \$\endgroup\$