public class Food extends Obj implements java.io.Serializable {
	static final long serialVersionUID = 2L;
	
	public enum type {SHIT, YUKKURIFOOD, CAKE};
	
	private type foodType;
	private int amount;
	
	public Food(int initX, int initY, type initType) {
		objType = FOOD;
		x = initX;
		y = initY;
		z = 0;
		foodType = initType;
		switch (initType) {
		case YUKKURIFOOD:
			amount = 60*60*2;
			break;
		case CAKE:
			amount = 60*60;
			break;
		default:
			amount = 60*60;
		}
		removed = false;
	}
	
	public type getFoodType() {
		return foodType;
	}
	
	public boolean isEmpty() {
		if (amount == 0) {
			return true;
		}
		return false;
	}
	
	public void eatFood(int eatAmount) {
		if (isEmpty()) {
			return;
		}
		amount -= eatAmount;
		if (amount < 0) {
			amount = 0;
		}
	}
	
	public int clockTick() {
		if (removed == false) {
			if (!grabbed && z > 0) {
				z -= 2;
				if (z <= 0) {
					z = 0;
				}
			}
			return DONOTHING;
		}
		return REMOVED;
	}
}