public ResourceAmount(ResourceType type, int amount) { this.type = type; this.amount = amount; }
public void GainResource(ResourceType type, int amount) { if (resources.ContainsKey(type)) { resources[type] += amount; } else { resources[type] = amount; } }
public int GetResourceAmount(ResourceType type) { if (resources.ContainsKey(type)) { return resources[type]; } else { return 0; } }
public Property_AmountOf(ResourceType type) { this.type = type; }