All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sso.Thing

java.lang.Object
   |
   +----sso.Persistant
           |
           +----sso.GameObject
                   |
                   +----sso.Thing

public class Thing
extends GameObject
Thing represents an object in the game that can be carried, used, or moves.


Variable Index

 o base_rating
 o base_value
 o capacity
 o cur_rating
 o key
 o weight

Constructor Index

 o Thing()
Constructor.

Method Index

 o accept(GameObject)
OVERRIDE METHOD.
 o createRows()
Create the row needed to store this object.
 o createThing()
Factory method for creating a new Thing.
 o getBaseCapacity()
Get base capacity.
 o getBaseRating()
Get base rating.
 o getBaseValue()
Gets the base value.
 o getBaseWeight()
Get base weight.
 o getCapacity()
Get total capacity.
 o getCarriedWeight()
Get carried weight.
 o getKey()
Get key.
 o getRating()
Get rating.
 o getValue()
Get value.
 o getWeight()
Get weight.
 o init()
New Thing initializer method.
 o isDroppable()
Can this object be dropped by holder?
 o isTakeableBy(PC)
Can this object be taken by the spec?
 o load()
Load the data into this instance.
 o loadThing(int)
Load a thing by ID.
 o main(String[])
Tester method.
 o move(GameObject)
OVERRIDE METHOD.
 o setBaseRating(int)
Set base rating.
 o setBaseValue(int)
Set value.
 o setCapacity(int)
Set base capacity.
 o setKey(GameObject)
Set key.
 o setRating(int)
Set current rating.
 o setWeight(int)
Set weight.
 o store()
Store the Thing.
 o unregister()
Remove the object from the database and registry.

Variables

 o weight
 protected int weight
 o base_value
 protected int base_value
 o capacity
 protected int capacity
 o base_rating
 protected int base_rating
 o cur_rating
 protected int cur_rating
 o key
 protected GameObject key

Constructors

 o Thing
 protected Thing()
Constructor. Do not call directly.

Methods

 o createThing
 public static Thing createThing()
Factory method for creating a new Thing.

 o init
 protected void init()
New Thing initializer method.

Overrides:
init in class GameObject
 o getWeight
 public int getWeight()
Get weight.

 o getBaseWeight
 public final int getBaseWeight()
Get base weight.

 o setWeight
 public void setWeight(int weight)
Set weight.

 o getValue
 public int getValue()
Get value. This may be overriden by child objects to incorporate value increases or decreases based on rating.

 o getBaseValue
 public final int getBaseValue()
Gets the base value.

 o setBaseValue
 public void setBaseValue(int base_value)
Set value. Sets the base value.

 o getCapacity
 public int getCapacity()
Get total capacity. This should be overriden by children (like PC).

 o getBaseCapacity
 public final int getBaseCapacity()
Get base capacity.

 o setCapacity
 public void setCapacity(int capacity)
Set base capacity.

 o getRating
 public int getRating()
Get rating. This can be overriden in child objects.

 o getBaseRating
 public final int getBaseRating()
Get base rating.

 o setBaseRating
 public void setBaseRating(int rating)
Set base rating.

 o setRating
 public void setRating(int rating)
Set current rating.

 o getCarriedWeight
 public int getCarriedWeight()
Get carried weight.

 o getKey
 public GameObject getKey()
Get key.

 o setKey
 public void setKey(GameObject key)
Set key.

 o isDroppable
 public boolean isDroppable()
Can this object be dropped by holder?

 o isTakeableBy
 public boolean isTakeableBy(PC pc)
Can this object be taken by the spec?

 o move
 public boolean move(GameObject destination)
OVERRIDE METHOD. Check to see if the Thing is takable or droppable.

Overrides:
move in class GameObject
 o accept
 public boolean accept(GameObject spec)
OVERRIDE METHOD. Only accept objects when sufficient capacity exists.

Overrides:
accept in class GameObject
 o createRows
 protected void createRows()
Create the row needed to store this object.

Overrides:
createRows in class GameObject
 o store
 public void store()
Store the Thing.

Overrides:
store in class GameObject
 o loadThing
 public static Thing loadThing(int id)
Load a thing by ID. Factory method.

 o load
 protected void load()
Load the data into this instance.

Overrides:
load in class GameObject
 o unregister
 public void unregister()
Remove the object from the database and registry.

Overrides:
unregister in class GameObject
 o main
 public static void main(String args[])
Tester method.


All Packages  Class Hierarchy  This Package  Previous  Next  Index