alice.kareltherobot
Class Wall

java.lang.Object
  extended by Square
      extended by alice.kareltherobot.Wall
All Implemented Interfaces:
KarelWorldItem

public class Wall
extends Square
implements KarelWorldItem

Wall objects in the robot world. If you click on a wall, the camera will move to a point above that wall (3 meters up). This isn't very useful unless the camera is following a robot as it will only then re-orient toward that robot.

Create and place walls with methods of the KarelWorld.

Author:
Cay Horstmann, with edits by Joe Bergin

Method Summary
 int avenue()
          The avenue closest to this wall on the west or that it crosses
 KarelWorld getWorld()
          Get the world to which this object has been added (but only after you add it).
 boolean isBoundary()
          Determine if this segment is part of the boundary wall.
 int street()
          The street closest to this wall on the south or that it crosses
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isBoundary

public boolean isBoundary()
Determine if this segment is part of the boundary wall.

Returns:
true if this is part of the boundary wall

getWorld

public KarelWorld getWorld()
Get the world to which this object has been added (but only after you add it).


street

public int street()
The street closest to this wall on the south or that it crosses

Specified by:
street in interface KarelWorldItem
Returns:
the street crossed (NORTH-SOUTH) or the street closest to the wall on the south (EAST-WEST)

avenue

public int avenue()
The avenue closest to this wall on the west or that it crosses

Specified by:
avenue in interface KarelWorldItem
Returns:
the avenue crossed (EAST-WEST) or the avenue closest to the wall on the west (NORTH-SOUTH)