public class Grasshopper extends Insect {
	public  int happiness;   		
	
	public Grasshopper () {
		happiness=10;
	}
	
	public Grasshopper (int a) {
		happiness=a;
	}
	
	public Grasshopper (int a, int b, boolean c, int d, int f) {
		super (a, b, c, d, f);				
	}
	
	public void Hop (int a, int b) {
		System.out.println("grasshopper hop");
		hunger=hunger+2;
		health++;
		
		if ( ((x+a) < 0) || ((x+a) >10) ) { x=(x+a)-10; }
		else { x=x+a; }

		if ( ((y+b) < 0) || ((y+b) >10)) { y=(y+b)-10; }
		else { y=y+b; }
	}
	
	public void Eat () {
		System.out.println("grasshopper eat");
		hunger=hunger-2;
	}
	
	public void Mate () {
		System.out.println("grasshopper mate");
		repro=true;
		health--;
	}

	public int getHunger () {return hunger;}
	public int getHealth () {return health;}
	public boolean getRepro () {return repro;}
	public int getX () {return x;}
	public int getY () {return y;}
}
	