games.strategy.engine.data
Class ResourceCollection
java.lang.Object
games.strategy.engine.data.GameDataComponent
games.strategy.engine.data.ResourceCollection
- All Implemented Interfaces:
- java.io.Serializable
public class ResourceCollection
- extends GameDataComponent
- Version:
- 1.0
- Author:
- Sean Bridges
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceCollection
public ResourceCollection(GameData data)
- Creates new ResourceCollection
addResource
public void addResource(Resource resource,
int quantity)
removeResource
public void removeResource(Resource resource,
int quantity)
- You cannot remove more than the collection contains.
getQuantity
public int getQuantity(Resource resource)
getQuantity
public int getQuantity(java.lang.String name)
has
public boolean has(IntegerMap<Resource> map)