info.gridworld.actor
Class Flower

java.lang.Object
  extended by info.gridworld.actor.Actor
      extended by info.gridworld.actor.Flower

public class Flower
extends Actor

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(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

Flower

public Flower()
Constructs a pink flower.


Flower

public Flower(Color initialColor)
Constructs a flower of a given color.

Parameters:
initialColor - the initial color of this flower
Method Detail

act

public void act()
Causes the color of this flower to darken.

Overrides:
act in class Actor