|
From: | Scott Christley |
Subject: | Re: [Swarm-Support] model |
Date: | Fri, 31 Aug 2007 15:11:16 -0400 |
There is nothing that prevents you from making the location, instance variables within the agent class. It isn't necessary for your agents to live on a grid space; they can live in any arbitrary space you wish to define as a "location". cheers Scott @interface MyClass : Swarm { double X; double Y; } - (void)putSelfAtX:(double)xPos atY:(double)yPos @end @implementation - (void)putSelfAtX:(double)xPos atY:(double)yPos { X = xPos; Y = yPos; } @end On Aug 31, 2007, at 4:06 AM, yuefengch wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |