cs1705
Class ur_Robot

java.lang.Object
  extended byjava.util.Observable
      extended bykareltherobot.ur_Robot
          extended bycs1705.ur_Robot
All Implemented Interfaces:
kareltherobot.Directions, Runnable

public class ur_Robot
extends kareltherobot.ur_Robot

This class is a simple wrapper for Bergin's ur_Robot class and represents a minimal robot. Please use VPIRobot instead of this class. This class is provided purely for compatibility with the examples in Bergin's text, so that if a student accidentally types in code nearly verbatim from the book, it will still work as expected.

Version:
2003.08.20
Author:
Stephen Edwards

Nested Class Summary
 
Nested classes inherited from class kareltherobot.ur_Robot
kareltherobot.ur_Robot.ConnectStrategy
 
Nested classes inherited from class kareltherobot.Directions
kareltherobot.Directions.Direction
 
Field Summary
 
Fields inherited from interface kareltherobot.Directions
East, EastVal, infinity, North, NorthVal, South, SouthVal, West, WestVal
 
Constructor Summary
ur_Robot(int street, int avenue, kareltherobot.Directions.Direction direction, int numberOfBeepers)
          Constructor which supports the specific placement, orientation and setting the number of beepers for Karel.
 
Methods inherited from class kareltherobot.ur_Robot
acceptConnection, acceptConnectionFrom, areYouHere, avenue, connectTo, direction, getNextCommunication, isVisible, move, neighbors, pickBeeper, putBeeper, restoreInitialState, run, running, send, setVisible, showState, street, toString, turnLeft, turnOff, waitForCommunication, waitForNextCommunication
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ur_Robot

public ur_Robot(int street,
                int avenue,
                kareltherobot.Directions.Direction direction,
                int numberOfBeepers)
Constructor which supports the specific placement, orientation and setting the number of beepers for Karel. Karel is placed at the intersection of the specified street and avenue, facing in the specified direction and holding the specified number of beepers in the beeper bag.

Parameters:
street - street number of Karel's placement
avenue - avenue number of Karel's placement
direction - the direction Karel is pointing in (North, East, South, West)
numberOfBeepers - number of beepers in the beeper bag (>= 0)