universum.bi
Interface BeingInterface

All Superinterfaces:
EntityInterface

public interface BeingInterface
extends EntityInterface

The BeingInterface defines everything being knows about reality it lives in. For random numbers and other utility functions see universum.util.Util (don't use java.util.random() or custom implementation for reproducablity reasons).

See Also:
Util

Method Summary
 float getEnergy(Being me)
          Every being is characterized by energy, this function returns current energy of the being
 float getMass(Being me, java.lang.Integer id)
          Provides rounded up mass of being described by id
 java.util.List<PointInfo> getNeighbourInfo(Being me)
          Information about points in the neighbourhood
 java.lang.Object getOwner(Being me, java.lang.Integer id)
          Provides owner's handle, for simple FoF detection
 PointInfo getPointInfo(Being me)
          Provide information about point where being is
 java.util.List<Location> getReachableLocations(Being me)
          Get the locations we can go to in one turn (depends on speed)
 void log(Being me, java.lang.String s)
          Logging facility
 Location stepToward(Being me, Location to)
          Compute step towards a location.
 
Methods inherited from interface universum.bi.EntityInterface
createLocation, distance, entityCost, getId, getLocation, getTurnsCount, timeTillKilled
 

Method Detail

getOwner

java.lang.Object getOwner(Being me,
                          java.lang.Integer id)
Provides owner's handle, for simple FoF detection

Returns:
id

getMass

float getMass(Being me,
              java.lang.Integer id)
Provides rounded up mass of being described by id

Returns:
rounded mass

getEnergy

float getEnergy(Being me)
Every being is characterized by energy, this function returns current energy of the being

Returns:
energy

getPointInfo

PointInfo getPointInfo(Being me)
Provide information about point where being is

Returns:
point description

getNeighbourInfo

java.util.List<PointInfo> getNeighbourInfo(Being me)
Information about points in the neighbourhood

Returns:
list of neighbour points

getReachableLocations

java.util.List<Location> getReachableLocations(Being me)
Get the locations we can go to in one turn (depends on speed)

Returns:
available locations

stepToward

Location stepToward(Being me,
                    Location to)
Compute step towards a location. Note that there may be several paths leading to the target, this function returns framgment of one of such paths.

Returns:
reachable location where being can go toward a target

log

void log(Being me,
         java.lang.String s)
Logging facility