interfaces
Interface SimWorld

All Known Implementing Classes:
BasicSimWorld

public interface SimWorld

Interface class for all SimWorlds.

Author:
Graham Ritchie

Method Summary
 void addObject(SimObject o)
          Adds an object to this SimWorld
 int getBrightness(double x, double y, double z)
          Returns the light level at the specified co-ordinate.
 java.util.LinkedList getObjectList()
          Returns this SimWorld's object list
 long getTime()
          Returns the number of 'ticks' since this world was started
 java.awt.Color getWorldColor()
          Returns the background color of this SimWorld Created by: Simon Zienkiewicz
 boolean hasObstacle(double x, double y, double z)
          Checks whether there is an obstacle in the specified co-ordinate
 void tick()
          Performs one update loop
 

Method Detail

tick

public void tick()
Performs one update loop


getTime

public long getTime()
Returns the number of 'ticks' since this world was started

Returns:
the number of ticks as a long

getBrightness

public int getBrightness(double x,
                         double y,
                         double z)
Returns the light level at the specified co-ordinate.

Parameters:
x - the x coordinate of position searched
y - the y coordinate of position searched
z - the z coordinate of position searched
Returns:
the brightness this will always be an int between 0 and 100

hasObstacle

public boolean hasObstacle(double x,
                           double y,
                           double z)
Checks whether there is an obstacle in the specified co-ordinate

Parameters:
x - the x coordinate of position searched
y - the y coordinate of position searched
z - the z coordinate of position searched
Returns:
true or false accordingly

getObjectList

public java.util.LinkedList getObjectList()
Returns this SimWorld's object list

Returns:
the object list as a LinkedList

addObject

public void addObject(SimObject o)
Adds an object to this SimWorld

Parameters:
o - the SimObject to be added

getWorldColor

public java.awt.Color getWorldColor()
Returns the background color of this SimWorld Created by: Simon Zienkiewicz

Returns:
Colour the background colour of the current world