package de.eightbitboy.ecorealms.simulation;

import java.util.EnumMap;
import java.util.Map;
import java.util.Set;

public class Inventory {

	private Map<Resource, Integer> resources; //TODO Find a better name!?

	public Inventory() {
		resources = new EnumMap<Resource, Integer>(Resource.class);
	}

	public Set<Resource> getResources() {
		return resources.keySet();
	}

	public void add(Resource resource, int amount) {
		//TODO
	}

	public int get(Resource resource) {
		return 0; //TODO
	}

	public int remove(Resource resource, int amount) {
		return 0; //TODO
	}
}

@@ -470,32 +470,106 @@
 ce) %7B%0A%09%09
-return 0; //TODO
+if (!resources.containsKey(resource)) %7B%0A%09%09%09return 0;%0A%09%09%7D%0A%09%09return resources.get(resource);
 %0A%09%7D%0A%0A%09pu

Implement logic