ai.worlds
Class Obj

java.lang.Object
  extended byai.worlds.Obj
Direct Known Subclasses:
AgentBody, Dirt, Gold, Pit, Wall, Wumpus

public abstract class Obj
extends java.lang.Object

A generic object that is contained in an environment.

Author:
Jill Zimmerman -- jill.zimmerman@goucher.edu

Field Summary
 boolean alive
          Is the object alive?
 boolean bump
          Status of bumps to the object.
 java.util.Vector container
          Some objects may contain other objects.
 Location heading
          The heading of the object.
 Location loc
          The location of the object.
 java.lang.String name
          The name of the object.
 boolean sound
          Status of sounds from the object.
 
Constructor Summary
Obj()
           
 
Method Summary
abstract  void draw(java.awt.Graphics g, java.awt.Point p, int cellSize)
          Draw the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the object.


alive

public boolean alive
Is the object alive?


loc

public Location loc
The location of the object.


heading

public Location heading
The heading of the object.


bump

public boolean bump
Status of bumps to the object.


container

public java.util.Vector container
Some objects may contain other objects.


sound

public boolean sound
Status of sounds from the object.

Constructor Detail

Obj

public Obj()
Method Detail

draw

public abstract void draw(java.awt.Graphics g,
                          java.awt.Point p,
                          int cellSize)
Draw the object.

Parameters:
g - is the graphics object.
p - is the position to draw.
cellSize - is the size of the cell in which it is drawn.