public int this[CardAttribute key]
{
get
{
if (!attributes.ContainsKey(key))
{
return 0;
}
else
{
return attributes[key];
}
}
set
{
if (!attributes.ContainsKey(key))
{
attributes.Add(key, value);
}
else if (attributes[key] == value)
{
return;
}
attributes[key] = value;
}
}