|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Microbe
Constructor Summary | |
Microbe(PlayField pf,
int x,
int y,
int start_energy,
int start_energyloss)
creates a new microbe |
Method Summary | |
int |
getcolor()
returns the "color" of this microbe, the "color" depends on its current energy level |
int |
getenergy()
returns the current energy level of this microbe |
int |
getenergyloss()
returns the energy loss per step |
int |
getx()
returns the current x position of the microbe |
int |
gety()
returns the current y position of the microbe |
void |
setenergy(int new_energy)
sets the energy level to a new value |
void |
setenergyloss(int new_energyloss)
sets the energy loss per step to a new value |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Microbe(PlayField pf, int x, int y, int start_energy, int start_energyloss)
pf
- playfield where this microbe "lives"x
- x startpositiony
- y startpositionstart_energy
- startenergystart_energyloss
- energy loss per stepMethod Detail |
public int getenergy()
public void setenergy(int new_energy)
new_energy
- new energy levelpublic int getenergyloss()
public void setenergyloss(int new_energyloss)
new_energyloss
- energyloss per steppublic int getx()
public int gety()
public int getcolor()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |