Analytical Perspectives in Game Design


 

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bvyy.database.Capability

java.lang.Object
   |
   +----bvyy.database.Capability

public class Capability
extends Object
implements Serializable
Make a general purpose capability model.

Intent

This is a capability class. It records the capabilities that a thing may have. These capabilities are organised into multiple trees as required by the game world builder.

Motivation

Allow the game desingers to specify capabilities that I could not have envisionaged. Maked the game customisable by a non-computer literate author with no need to write code.

Version:
0.0.2 26 October 1998
Author:
(c) 1998 Brian Voon Yee Yap

Constructor Index

 o Capability(String)
Creates a new root Capability.
 o Capability(String, Capability)
Creates a new Capability.

Method Index

 o addCapability(String)
Adds a new capability as a branch.
 o addGeneralEventListener(GeneralEventListener)
 o elements()
Returns an enumeration of the components of this vector.
 o fireReceiveEvent(GeneralEvent)
 o getCommand()
 o getName()
returns the Name for this capability.
 o getNounForm()
 o getParent()
 o getRoot()
Test if this capability is the root.
 o removeCapability(String)
removes a capability from the branches.
 o removeGeneralEventListener(GeneralEventListener)
 o setCommand(Command)
 o setName(String)
Sets the name for this capability.
 o setNounForm(String)
 o setParent(Capability)
 o setRoot(boolean)
Sets this node to be a root node.

If the parent has been set, then the paret is reset to null.

Constructors

 o Capability
 public Capability(String newName)
Creates a new root Capability.

Parameters:
newName - The name for this capability.
 o Capability
 public Capability(String newName,
                   Capability myParentCapability)
Creates a new Capability.

Parameters:
newName - The name for this capability.
myParentCapability - The name of the parent capability.

Methods

 o getRoot
 public boolean getRoot()
Test if this capability is the root.

Returns:
true if this capability is at the root.
 o setRoot
 public void setRoot(boolean newRoot)
Sets this node to be a root node.

If the parent has been set, then the paret is reset to null.

 o elements
 public synchronized Enumeration elements()
Returns an enumeration of the components of this vector.

Returns:
an enumeration of the components of this vector.
 o setName
 public synchronized void setName(String newName)
Sets the name for this capability.

 o getName
 public synchronized String getName()
returns the Name for this capability.

Returns:
the name of this capability.
 o addCapability
 public synchronized void addCapability(String newCapability)
Adds a new capability as a branch.

Parameters:
newCapability - the new capability to be added to the node.
 o removeCapability
 public synchronized boolean removeCapability(String oldCapability)
removes a capability from the branches.

Parameters:
oldCapability - the capability to be removed.
Returns:
false if the object spcified did not exist. true if it did.
 o removeGeneralEventListener
 public synchronized void removeGeneralEventListener(GeneralEventListener l)
 o addGeneralEventListener
 public synchronized void addGeneralEventListener(GeneralEventListener l)
 o fireReceiveEvent
 protected void fireReceiveEvent(GeneralEvent e)
 o setParent
 public void setParent(Capability newParent)
 o getParent
 public Capability getParent()
 o setCommand
 public void setCommand(Command newCommand)
 o getCommand
 public Command getCommand() throws NoCommandAssignedException
 o setNounForm
 public void setNounForm(String newNounForm)
 o getNounForm
 public String getNounForm()

All Packages  Class Hierarchy  This Package  Previous  Next  Index

22/11/99

 


See also: [Role Playing Games] [Game Engine]
© 1998, 1999 Brian Yap. These pages are available under the GNU licence.