private State getState() { if (MyPlayer.needToEat() && MyPlayer.hasFood()) return State.EAT; else return State.ATTACK; }