|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.gridworld.actor.Actor
info.gridworld.actor.Flower
public class Flower
A Flower is an actor that darkens over time. Some actors drop
flowers as they move.
The API of this class is testable on the AP CS A and AB exams.
| Constructor Summary | |
|---|---|
Flower()
Constructs a pink flower. |
|
Flower(java.awt.Color initialColor)
Constructs a flower of a given color. |
|
| Method Summary | |
|---|---|
void |
act()
Causes the color of this flower to darken. |
| Methods inherited from class info.gridworld.actor.Actor |
|---|
getColor, getDirection, getGrid, getLocation, moveTo, putSelfInGrid, removeSelfFromGrid, setColor, setDirection, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Flower()
public Flower(java.awt.Color initialColor)
initialColor - 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 | |||||||||