universum.bi
Class PointInfo

java.lang.Object
  extended by universum.bi.PointInfo

public final class PointInfo
extends java.lang.Object

Information on particular point of the universe. Unlike Location keeps dynamical information about the world.


Constructor Summary
PointInfo(universum.engine.Universe u, Location loc)
          Engine only constructor.
 
Method Summary
 void addEntity(java.lang.Integer id)
          Engine-only API.
 float getCount(Being me)
          Amount of energy at this point.
 java.lang.Integer[] getEntities(Entity me, java.lang.Integer[] data)
          Returns ids of all entities at given point.
 float getGrowthRate(Being me)
          How fast energy increases here.
 Location getLocation()
          Topological location of this point.
 float getMaxCount(Being me)
          The maximum amount of energy at the point.
 void removeEntity(java.lang.Integer id)
          Engine-only API.
 float totalMass(Being me)
          Total mass of beings at the point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointInfo

public PointInfo(universum.engine.Universe u,
                 Location loc)
Engine only constructor.

Method Detail

getLocation

public Location getLocation()
Topological location of this point.


getCount

public float getCount(Being me)
Amount of energy at this point.


getGrowthRate

public float getGrowthRate(Being me)
How fast energy increases here.

Returns:
increase per turn

getMaxCount

public float getMaxCount(Being me)
The maximum amount of energy at the point.


getEntities

public java.lang.Integer[] getEntities(Entity me,
                                       java.lang.Integer[] data)
Returns ids of all entities at given point. Can be used as parameter for events. Parameter data is an array, if of enough length to be used as output paramter, otherwise new array allocated. If its length bigger than number of entities, array is null-terminated.

Returns:
array of entities

addEntity

public void addEntity(java.lang.Integer id)
Engine-only API.


removeEntity

public void removeEntity(java.lang.Integer id)
Engine-only API.


totalMass

public float totalMass(Being me)
Total mass of beings at the point.

Returns:
sum of masses of all beings at the point, or -1 if we cannot