Position class documentation

Authors

Generated by pauljohn

Software documentation for the Position class

Position : SwarmObject

Declared in:
Position.h

Description forthcoming.


Instance Variables

Method summary

lispOutDeep: 

- (void) lispOutDeep: (id)stream;

" Position is a class that holds location information for agents. It contains a pointer to a "world" (a grid, really) as well as location coordinates (x,y) in that world (which are stored as an array, so it is actually (location[0],location[1]), the dimensions of that grid and an integer that can act as an "identifier" for that world. One of the confusing things about this model is that the standard Swarm term "world" does not exactly fit, so I'm replacing it with Position."




Instance Variables for Position Class

grid

@public id grid;

Swarm Grid2d or a subclass of it


identifier

@public int identifier;

0 for home, 1 for work, etc


location

@public int location;

Array holding (x,y) coordinates of agent on the grid


worldSize

@public int worldSize;

Array holding dimensions of the grid object