|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.collegeboard.gridworld.actor.Actor
com.collegeboard.gridworld.actor.Flower
public class Flower
Some actors drop flowers as they move. Flowers wilt by turning black over time.
copyright© 2005 Cay S. Horstmann (http://horstmann.com)
| Constructor Summary | |
|---|---|
Flower()
Constructs a pink flower. |
|
Flower(Color color)
Constructs a flower of a given color. |
|
| Method Summary | |
|---|---|
void |
act()
When a flower acts, it "wilts", gradually losing its color. |
| Methods inherited from class com.collegeboard.gridworld.actor.Actor |
|---|
getColor, getDirection, getGrid, getLocation, moveTo, putSelfInGrid, removeSelfFromGrid, setColor, setDirection, toString, turnBy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Flower()
public Flower(Color color)
color - the initial color of this flower| Method Detail |
|---|
public void act()
act in class Actor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||