|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--GameObject
|
+--RealObject
|
+--Wanderer
|
+--Toddler
This class is intended to implement my own wonderful son,
Julian. I wanted to add
throws Food to the class definition, but the compiler told me that a brace
was expected. So now it's an expert on orthodontia? Anyhow, the main difference between
a Toddler and a generic Wanderer is that a Toddler waves bye-bye to anything that leaves
its room and continues to do so for several turns after the thing leaves.
| Inner classes inherited from class RealObject |
RealObject.ContentsMessager, RealObject.DescriptionLineProcessor |
| Inner classes inherited from class GameObject |
GameObject.LeaveInfo |
| Field Summary | |
protected int |
byeCount
How many more turns to wave byebye |
protected java.lang.String |
byeMessage
Message to display each turn. |
| 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) |
Toddler()
Sets mobility to .1 |
| Method Summary | |
void |
doAction()
If somebody left recently, continue to wave byebye; otherwise, do superclass action. |
void |
goodbye(GameObject.LeaveInfo leaveInfo)
Notice somebody leaving and start waving byebye. |
| 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, listen, newInstance, setMasterGame, toString |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected int byeCount
protected java.lang.String byeMessage
| Constructor Detail |
Toddler()
| 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 go
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||