Class Food

java.lang.Object
  extended by Item
      extended by Food
All Implemented Interfaces:
java.io.Serializable

public class Food
extends Item

See Also:
Serialized Form

Field Summary
private  int breathAmount
           
private  int energyValue
           
private  boolean isEdible
           
private  int maxEnergyValue
           
static boolean WILL_REGROW
           
 
Constructor Summary
Food(Vector pos, Environment env)
           
 
Method Summary
 void action()
           
 void breathe()
           
 int energyValue()
           
 int giveEnergy()
           
 boolean isEdible()
           
 boolean isPortable()
           
 void setEnergyValue(int i)
           
 
Methods inherited from class Item
age, classImage, className, color, displacement, displacement, distanceFrom, distanceFrom, environment, image, incrementAge, isActive, isAlive, isPushable, isSolid, message, messageCounter, performSpecificFunction, position, radiusOfContact, reduceMessageCounter, remove, setActive, setAge, setColor, setEnvironment, setImage, setMessage, setPosition, setRadiusOfContact, showMessage, theCloser, toImage, touchingDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WILL_REGROW

public static boolean WILL_REGROW

maxEnergyValue

private int maxEnergyValue

energyValue

private int energyValue

breathAmount

private int breathAmount

isEdible

private boolean isEdible
Constructor Detail

Food

public Food(Vector pos,
            Environment env)
Method Detail

action

public void action()
Overrides:
action in class Item

breathe

public void breathe()

energyValue

public int energyValue()

setEnergyValue

public void setEnergyValue(int i)

giveEnergy

public int giveEnergy()

isPortable

public boolean isPortable()
Overrides:
isPortable in class Item

isEdible

public boolean isEdible()
Overrides:
isEdible in class Item