Anyone know how to get the game to not stop? Help is greatly appreciated!
/**
* Is there any food here where we are? If so, try to load some!
*/
public void checkFood()
{
// check whether there's a tomato pile here
TomatoPile tomatoPile = (TomatoPile) getOneIntersectingObject(TomatoPile.class);
if(tomatoPile != null)
{
loadTomato();
turnHome();
int deltaX = tomatoPile.getX() - getX();
int deltaY = tomatoPile.getY() - getY();
setRotation((int) (180 * Math.atan2(deltaY, deltaX) / Math.PI));
}
}
