// extend Critter so he is now a green cannibal import info.gridworld.actor.Critter; import info.gridworld.actor.Rock; import info.gridworld.actor.Actor; import java.util.ArrayList; import java.awt.Color; public class cannibalCritter extends Critter { public cannibalCritter() { setColor(new Color(0,255,0)); } public void processActors(ArrayListactors) { for (Actor a : actors) { if (!(a instanceof Rock)) a.removeSelfFromGrid(); } } } _____________________________________________ import info.gridworld.actor.ActorWorld; import info.gridworld.actor.Critter; import info.gridworld.actor.Rock; import info.gridworld.actor.Bug; import info.gridworld.actor.Critter; public class canRunner { public static void main(String[] args) { ActorWorld world = new ActorWorld(); world.add(new Bug()); world.add(new Rock()); world.add(new Critter()); world.add(new Critter()); world.add(new cannibalCritter()); world.add(new cannibalCritter()); world.add(new cannibalCritter()); world.show(); } }