becker.robots
Class Wall

java.lang.Object
  extended by becker.robots.Sim
      extended by becker.robots.Thing
          extended by becker.robots.Wall

public class Wall
extends Thing

A Wall will block the movement of a robot into or out of the intersection which contains it, depending on the robot's direction of travel and the orientation of the Wall.

Author:
Byron Weber Becker

Constructor Summary
Wall(City city, int street, int avenue, Direction orientation)
          Construct a new wall.
 
Method Summary
protected  void save(String indent, PrintWriter out)
          Save a representation of this intersection to an output stream.
 
Methods inherited from class becker.robots.Thing
blocksIntersectionEntry, blocksIntersectionExit, canBeCarried, getIntersection, setBlocksEntry, setBlocksEntry, setBlocksExit, setBlocksExit, setCanBeCarried, toString
 
Methods inherited from class becker.robots.Sim
getCity, getColor, getIcon, keyTyped, notifyObservers, notifyObservers, setColor, setIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Wall

public Wall(City city,
            int street,
            int avenue,
            Direction orientation)
Construct a new wall.

Parameters:
city - The city in which the wall will exist.
street - The wall's initial street within the city.
avenue - The wall's initial avenue within the city.
orientation - The direction in which the wall blocks entry into and exit out of the wall's intersection. One of {Direction.NORTH, EAST, SOUTH, WEST}.
Method Detail

save

protected void save(String indent,
                    PrintWriter out)
Save a representation of this intersection to an output stream.

Overrides:
save in class Thing
Parameters:
indent - the indentation, for formatting purposes
out - the output stream