>
Hi Aaron,
Basically I have an environment which I display in the xwindow system.
In the environment class I have a slot for the agents in the environment
which is initially an empty list. I also have a class agent, I'm trying
to add a series of instances of this agent class to the list. This way
when I call the display method for the environment it goes through the
list of agents drawing them. To make a new instance of the class agent
I'm using
newagent()->agt
then I add agt to the list using ::
If I wanted to access slots in the environment class from within an
agent method what would be the best way to do this? I'm using a global
variable at present which isn't very nice.
Thanks
Mike
|