|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Cone alice.kareltherobot.Beeper
public class Beeper
Represents a beeper in the world. If you click on a beeper in the world, it will tell you how many beepers are on that corner. Normally create these with methods of the KarelWorld.
Constructor Summary | |
---|---|
Beeper(int street,
int avenue)
Constructs a single beeper at a given grid location. |
Method Summary | |
---|---|
int |
avenue()
Gets the avenue location of the center of this beeper. |
KarelWorld |
getWorld()
Get the world to which this object has been added (but only after you add it). |
int |
howMany()
How many beeers are on the corner that this one occupies |
int |
street()
Gets the street location of the center of this beeper. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Beeper(int street, int avenue)
street
- the street number of the beeperavenue
- the avenue number of the beeperMethod Detail |
---|
public KarelWorld getWorld()
public int howMany()
public int street()
public int avenue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |