vacworld
Class VacPercept

java.lang.Object
  extended by agent.Percept
      extended by vacworld.VacPercept

public class VacPercept
extends Percept

A percept in the vacuum cleaning world.


Constructor Summary
VacPercept(VacuumState state, Agent agent)
          Construct a vacuum world percept.
 
Method Summary
 boolean feelBump()
          Returns true if the percept reflects that the agent bumped into an obstacle as a result of its most recent action.
 boolean seeDirt()
          Returns true if the percept reflects that the agent is over dirt.
 boolean seeObstacle()
          Returns true if the percept reflects that the square immediately in front of the agent contains an obstacle.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VacPercept

public VacPercept(VacuumState state,
                  Agent agent)
Construct a vacuum world percept. If the agent is in a square that has dirt, then create a percept that sees dirt. If the agent is directly in front of and facing an obstacle, then the agent can see the obstacle. If the agent moved into an obstacle on the previous turn the agent will feel a bump.

Method Detail

seeDirt

public boolean seeDirt()
Returns true if the percept reflects that the agent is over dirt.


seeObstacle

public boolean seeObstacle()
Returns true if the percept reflects that the square immediately in front of the agent contains an obstacle.


feelBump

public boolean feelBump()
Returns true if the percept reflects that the agent bumped into an obstacle as a result of its most recent action.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object