public AgentEnv createLittleGirl1() { AgentInfo info = new AgentInfo(Color.Pink, 0.005f, AgentType.Little_Girl, generateID(), AgentState.Find_Me, float.Epsilon, new Coordinates(0.5f, 0.5f), Average.speed / 5, Average.viewRadius); AgentEnv env = new AgentEnv( Average.speed, Average.viewRadius, info); Agent nancy = new LittleGirl1(ref env); env.setAgent(nancy); addAgent(ref env); return env; }
//Initialize and add agents of corresponding types public AgentEnv createDummy1() { AgentInfo info = new AgentInfo(Color.Green, 0.01f, AgentType.Dummy, generateID(), AgentState.Searching, Average.commRadius, new Coordinates(0.5f, 0.5f), Average.speed / 5, Average.viewRadius); AgentEnv env = new AgentEnv(Average.speed, Average.viewRadius, info); Agent bill = new Dummy1(ref env); env.setAgent(bill); addAgent(ref env); return env; }
public AgentEnv createFinder1() { AgentInfo info = new AgentInfo(Color.Magenta, 0.01f, AgentType.Finder, generateID(), AgentState.Searching,Average.commRadius, new Coordinates(0.5f, 0.5f), Average.speed/5, Average.viewRadius); AgentEnv env = new AgentEnv(Average.speed/5, Average.viewRadius, info); //причесать это и перенести в info Agent holmes = new Finder1(ref env); env.setAgent(holmes); addAgent(ref env); return env; }
public AgentEnv(float speed_, float radius, AgentInfo info_) { info.speed = speed_; info.viewRadius = radius; info = info_; }