|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbecker.robots.Sim
becker.robots.Thing
TrafficLight
public class TrafficLight
This class provides support for the Drivers' Ed project found here. An object of this class manages the state of the light by continuously cycling through the 3 states: green > yellow > red > green... and so on.
Constructor Summary | |
---|---|
TrafficLight(becker.robots.City c,
int s,
int a)
|
Method Summary | |
---|---|
boolean |
exitsBlocked()
|
void |
run()
Called by the Thread object. |
Methods inherited from class becker.robots.Thing |
---|
blocksIntersectionEntry, blocksIntersectionExit, canBeCarried, getIntersection, save, setBlocksEntry, setBlocksEntry, setBlocksExit, setBlocksExit, setCanBeCarried, toString |
Methods inherited from class becker.robots.Sim |
---|
getCity, getColor, getIcon, keyTyped, notifyObservers, notifyObservers, setColor, setIcon |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TrafficLight(becker.robots.City c, int s, int a)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public boolean exitsBlocked()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |