Class Wall

  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.

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


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

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


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

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