java-projects/critters/Food.java

19 lines
370 B
Java
Raw Normal View History

// This defines a simple class of critters that sit around waiting to be
// taken over by other critters.
import java.awt.*;
public class Food extends Critter {
public Action getMove(CritterInfo info) {
return Action.INFECT;
}
public Color getColor() {
return Color.GREEN;
}
public String toString() {
return "F";
}
}