Your die() method is executed before your eat() method. The run-time error is occurring because you call die(), remove yourself from the world, then call eat(), which checks if you can see any worms. Checking if you can see something when you are not in the world gives the error that the actor is not in the world. Probably the simplest fix is to switch the order of die() and eat().