info.gridworld.actor
Class Flower
java.lang.Object
info.gridworld.actor.Actor
info.gridworld.actor.Flower
public class Flower
- extends Actor
Some actors drop flowers as they move. Flowers wilt by turning
black over time.
|
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. |
Flower
public Flower()
- Constructs a pink flower.
Flower
public Flower(Color color)
- Constructs a flower of a given color.
- Parameters:
color - the initial color of this flower
act
public void act()
- When a flower acts, it "wilts", gradually losing its color.
- Overrides:
act in class Actor