becker.robots
Class Wall
java.lang.Object
becker.robots.Sim
becker.robots.Thing
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. |
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}.
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 purposesout
- the output stream