|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Food
Field Summary | |
static int |
TYPE_BAD
food_type: bad food |
static int |
TYPE_BORDER
food_type: border |
static int |
TYPE_GOOD
food_type: good food |
static int |
TYPE_MAXFOOD
food_type: the best-energy food |
static int |
TYPE_MINFOOD
food_type: the lowest-energy food |
static int |
TYPE_NOTHING
food_type: no food |
static int |
TYPE_VERYBAD
food_type: very bad food |
static int |
TYPE_VERYGOOD
food_type: very good food |
Constructor Summary | |
Food()
creates a TYPE_NOTHING food |
|
Food(int type)
creates food of a special type |
Method Summary | |
void |
clear()
returns the foodtype to TYPE_NOTHING |
Color |
getcolor()
returns the color of this food |
int |
getenergy()
returns the energy level of this food |
int |
gettype()
returns the type of this food |
void |
settype(int type)
sets the foodtype of this food |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int TYPE_BORDER
public static final int TYPE_VERYBAD
public static final int TYPE_BAD
public static final int TYPE_NOTHING
public static final int TYPE_GOOD
public static final int TYPE_VERYGOOD
public static final int TYPE_MINFOOD
public static final int TYPE_MAXFOOD
Constructor Detail |
public Food()
public Food(int type)
type
- type of this foodMethod Detail |
public void settype(int type)
type
- type of this foodpublic int gettype()
public Color getcolor()
public int getenergy()
public void clear()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |