|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbecker.robots.City
Annex
public class Annex
This class provides support for the Drivers' Ed project found here. A walled city environment is displayed with a Runnable TrafficLight object at one of the intersections.
Constructor Summary | |
---|---|
Annex()
The constructor loads its City configuration from the file Annex.txt , before turning on the Thing counts. |
Method Summary | |
---|---|
becker.robots.Direction[] |
getPossibleDirections(StudentDriver student)
This methods returns an array of possible directions available to a StudentDriver to pursue. |
boolean |
isTrafficLight(int s,
int a)
This predicate method can be called to determine if an intersection contains a TrafficLight object. |
boolean |
isTrafficLightRed(int s,
int a)
This predicate method can be called to determine if the TrafficLight object at this intersection is RED. Precondition: There is a TrafficLight at this intersection. |
protected becker.robots.Intersection |
makeIntersection(int s,
int a)
|
Methods inherited from class becker.robots.City |
---|
customizeIntersection, examineLights, examineRobots, examineThings, examineThings, getIntersection, getThingCountPredicate, isShowingThingCounts, keyTyped, save, setFrameTitle, setSize, setThingCountPredicate, showFrame, showThingCounts, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Annex()
Annex.txt
, before turning on the Thing counts. It
instantiates a single instance of a Runnable TrafficLight, mounts it on a
thread and launches the thread.
Method Detail |
---|
protected becker.robots.Intersection makeIntersection(int s, int a)
makeIntersection
in class becker.robots.City
public boolean isTrafficLight(int s, int a)
s
- the street for which the request is madea
- the avenue for which the request is made
public boolean isTrafficLightRed(int s, int a)
s
- the street for which the request is madea
- the avenue for which the request is made
public becker.robots.Direction[] getPossibleDirections(StudentDriver student)
student
- the StudentDriver object making the request
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |