/*
* AP(r) Computer Science GridWorld Case Study:
* Copyright(c) 2005-2006 Cay S. Horstmann (http://horstmann.com)
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* @author Cay Horstmann
*/
package info.gridworld.actor;
import java.awt.Color;
/**
* 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.
*/
public class Rock extends Actor
{
private static final Color DEFAULT_COLOR = Color.BLACK;
/**
* Constructs a black rock.
*/
public Rock()
{
setColor(DEFAULT_COLOR);
}
/**
* Constructs a rock of a given color.
* @param rockColor the color of this rock
*/
public Rock(Color rockColor)
{
setColor(rockColor);
}
/**
* Overrides the act
method in the Actor
class
* to do nothing.
*/
public void act()
{
}
}