|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--GameObject
|
+--RealObject
|
+--Wanderer
|
+--Dog
A Dog can follow something that leaves the room and follow directions.
| Inner classes inherited from class RealObject |
RealObject.ContentsMessager, RealObject.DescriptionLineProcessor |
| Inner classes inherited from class GameObject |
GameObject.LeaveInfo |
| Field Summary | |
(package private) GameObject.LeaveInfo |
followInfo
Keep track of what we're going to follow and where. |
| Fields inherited from class Wanderer |
mobility |
| Fields inherited from class RealObject |
contents, longDescription, parentObject, shortDescription, spreadto |
| Fields inherited from class GameObject |
masterGame, name |
| Constructor Summary | |
(package private) |
Dog()
Sets mobility to only .07 because the faithful Dog will usually stay put unless it has a good reason to go. |
| Method Summary | |
void |
doAction()
If we want to follow something, do so; otherwise do superclass action. |
void |
goodbye(GameObject.LeaveInfo leaveInfo)
If something leaves the room, then with a 60% chance we will make a note to follow it at our next turn. |
void |
listen(java.lang.String message)
If the command is "go somewhere," try to go in that direction. |
| Methods inherited from class Wanderer |
initialize |
| Methods inherited from class RealObject |
checkLeave, clone, getLongDescription, getParent, getShortDescription, getSpreadability, hello, isPredicate, preClone, register, roomOf, runSpy, setParent, spread, tellAll, unregister, wanderVia |
| Methods inherited from class GameObject |
announce, compareTo, getMasterGame, kill, newInstance, setMasterGame, toString |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
GameObject.LeaveInfo followInfo
| Constructor Detail |
Dog()
| Method Detail |
public void doAction()
doAction in class Wandererpublic void goodbye(GameObject.LeaveInfo leaveInfo)
goodbye in class RealObjectRealObjectleaveinfo - Information about who's trying to leave
and where they want to gopublic void listen(java.lang.String message)
listen in class GameObjectGameObjectmessage - English message telling the object what to do.
The messages was probably typed
in by a user, but could also have been a request by some
other object during its doAction time.
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||