1   package interfaces;
2   
3   import java.util.*;
4   
5   /**
6   * Interface class for all SimWorlds.
7   *
8   * @author Graham Ritchie
9   */
10  public interface SimWorld
11  {
12      /**
13      * Performs one update loop
14      */
15      public void tick();
16      
17      /**
18      * Returns the number of 'ticks' since this world was started
19      *
20      * @return the number of ticks as a long
21      */
22      public long getTime();
23  
24      /**
25      * Returns the light level at the specified co-ordinate. 
26      *
27      * @return the brightness, this will always be an int between 0 and 100
28      */
29      public int getBrightness(double x, double y, double z);
30  
31      /**
32      * Checks whether there is an obstacle in the specified co-ordinate
33      *
34      * @return true or false accordingly
35      */
36      public boolean hasObstacle(double x, double y, double z);
37  
38      /**
39      * Returns this SimWorld's object list
40      *
41      * @return the object list as a LinkedList
42      */
43      public LinkedList getObjectList();
44      
45      /**
46      * Adds an object to this SimWorld
47      *
48      * @param o the SimObject to be added
49      */
50      public void addObject(SimObject o);
51  }
52