- Direct Known Subclasses:
- NonPlayerCharacter, PlayerCharacter
- public class Character
- extends java.lang.Object
The Character class defines a base class for characters in the game.
This class implements the functionality that is used by all derived classes.
- See Also:
Creates an empty base character.
Creates a new base character with a name, location and orientation.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- Creates an empty base character.
public Character(java.lang.String s,
- Creates a new base character with a name, location and orientation.
This constructor will set up an initial metastate too.
s - name for the new character
l - initial location of the character
o - initial orientation of the character
public void moveTo(Location l)
- Moves the character to a new location. The current location of the
character is updated and the action of moving is viewable through the user
public void turnTo(Orientation o)
- Turns the character to a new orientation. The current orientation of the
character is updated and the action of turning is viewable through the user