public class Food extends Obj {
	public static final int YUKKURIFOOD = 1;
	public static final int CAKE = 2;
	
	private int foodType;
	private int amount;
	
	public Food(int initX, int initY, int 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 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;
	}
}