Class Toddler

java.lang.Object
  |
  +--GameObject
        |
        +--RealObject
              |
              +--Wanderer
                    |
                    +--Toddler
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, Spyable

class Toddler
extends Wanderer

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
, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

byeCount

protected int byeCount
How many more turns to wave byebye

byeMessage

protected java.lang.String byeMessage
Message to display each turn.
Constructor Detail

Toddler

Toddler()
Sets mobility to .1
Method Detail

doAction

public void doAction()
If somebody left recently, continue to wave byebye; otherwise, do superclass action.
Overrides:
doAction in class Wanderer

goodbye

public void goodbye(GameObject.LeaveInfo leaveInfo)
Notice somebody leaving and start waving byebye.
Overrides:
goodbye in class RealObject
Following copied from class: RealObject
Parameters:
leaveinfo - Information about who's trying to leave and where they want to go