info.gridworld.actor
Class Rock

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

public class Rock
extends Actor

A Rock is an actor that does nothing. It is commonly used to block other actors from moving.
The API of this class is testable on the AP CS A and AB exams.


Constructor Summary
Rock()
          Constructs a black rock.
Rock(Color rockColor)
          Constructs a rock of a given color.
 
Method Summary
 void act()
          Overrides the act method in the Actor class to do nothing.
 
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

Rock

public Rock()
Constructs a black rock.


Rock

public Rock(Color rockColor)
Constructs a rock of a given color.

Parameters:
rockColor - the color of this rock
Method Detail

act

public void act()
Overrides the act method in the Actor class to do nothing.

Overrides:
act in class Actor